Playlist Extended playlist (includes optional videos) | schedule page slides as PDF |
Object 1 — datatype-oriented vs. object-oriented (4:06)
PLAI§10, more or less. See also OOPLAI. Introduces the concepts of datatype-oriented programming and object-oriented programming, and explains how both relate to functional programming.
Object 2 — objects as functions (2:45)
Shows a simplistic encoding of objects as functions, illustrating what it means to treat variants and operations in an object-oriented way (even in a language without “objects”).
Object 2b — Envs as objects (3:13)
OPTIONAL. Uses the function encoding of objects to change the treatment of environments in our interpreter from datatype-oriented style to object-oriented style. This is the beginning of a sequence that builds up the core elements of the “object” concept, but doing so in terms of functions.
Object 2c — ExprCs as objects (3:48)
OPTIONAL. Converting ExprC to objects. See lambda-clos.rkt.
Object 3 — objects as hashes (4:29)
The simplistic object encoding supports only a single operation (i.e., a single method) in each object. We can use a hash table of functions to support module operations (methods), but we have to switch to untyped #lang plai.
Object 3b — Value
s as objects (8:57)
OPTIONAL. Converting Value to objects, using the new hash-table encoding. See lambda-hash-u.rkt.
Object 4 — objects as fields plus methods (4:02)
The final encoding of objects, which avoids higher-order functions by explicitly representing a table of field and a table of methods in each object. The point of avoiding higher-order functions is that we can have a simpler core for just objects without functions—but the encoding starts to get complex.
Object 4b — object macro (4:02)
OPTIONAL. Syntactic sugar for the fields-and-methods representation of objects. This sugar provides syntax in #lang plai that matches the syntax that we’re about to implement as the new book language. See object-demo.rkt. See also lambda-obj-u.rkt, which is the object-oriented interpeter using this syntactic form.
Object 5 — language of objects (4:52)
Introduces the new book language, which has objects (and field access and method calls) and not functions (or function calls).
Object 6 — expressiveness (2:10)
OPTIONAL. An aside showing why our new book language is just as expressive as the one with functions: both are Turing-complete.
Object 7 — interp examples (6:21)
The new book-language grammar and some examples to explore how interp should work.
Object 8 — interp (4:05)
Implementation of interp. See object.rkt.