Dynamic Multiclassing

SqueakSource3 project page

Ad-hoc, non-destructive multiple-inheritance for any object of any two classes, offered by the class DerivedObject. Create a private state context that is shared with a public state context; useful for treating "contained in" relationships like "is a". New objects shadow method lookup.

Create objects using #derive: and treat them like any regular object.

Use the method #origin to access the original object.

Use the method #isDerived to determine if an object has been derived from another object.

DerivedObject-lp.1.mcz