Playlist | schedule page slides as PDF |
Subtyping 1 — records (5:58)
A recap of records as in the record videos, but now with types. See typed-record.rkt.
Subtyping 2 — subtypes (6:46)
Motivation for and implementation of a subtype relation on record types. See subtype (but that implementation has everything through video 6).
Subtyping 3 — record fields (2:50)
Extending the subtype relation to let field types be subtypes witin record subtype. (This turns out to be unsound for mutable records, but it’s fine for functional update.)
Subtyping 4 — function results (2:50)
Extending the subtype relation to allow function types that return subtypes.
Subtyping 5 — function arguments (4:18)
Extending the subtype relation to allow function types that consume supertypes, which is an example of contravariance. See subtype for all of the pieces put together.
Subtyping 6 — terminology (1:34)
Explains the terms covariant and contravariant.
Subtyping 7 — mutable records (5:16)
Our subtyping turns out to be unsound with mutable records, where field types must be invariant. See subtype-mut.