Object-oriented programming is done like this:
let OO := requireModule "OO" in import [Object wrap! (class)] from OO in let Widget := class ... (requireModule "Composition").dispatch (#exports[]) Object in let Button := class let click! := \self ... in let new! := allocatePointer! ;\ptr ... wrap! ptr in (requireModule "Composition").dispatch (#exports[click! new!]) Widget in
The Object from which all other Objects are derived.
Identity function in order to make people feel comfortable.
Given a class and an instance, results in a dispatcher for that class and instance.
Eventually does: Given a class and an instance, results in a dispatcher for that class and instance.