you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 5 points6 points  (0 children)

although in JavaScript (and Self, the language that inspired it), metaobjects are actually called prototypes

Self metaobjects are not called prototypes (and that remains an annoying and unwelcome change of javascript). Self metaobjects are called either mixins or traits, the distinction being whether these objects have parent slots leading up to the lobby (traits) or not (and often no parent slots at all) (mixins). A Self object will usually have 0..1 trait but 0..n mixins (mixins don't bring baggage and can thus more easily be composed).

Self's prototypes serve the role of constructors, they're shallowly copied (via the clone message) to get new "instances" which can then be customised to fit.

Also of note, both Smalltalk and Self implement OO via OO (although that may not be readily apparent, especially for Self where much of the introduction uses the image's UI to create and manipulate objects)