3 ms·
This "concatenative inheritance" seems like a symptom of JavaScript's limited support for prototypal OO. Objects in Self support multiple prototype slots: you
by panic 11y ago
This "concatenative inheritance" seems like a symptom of JavaScript's limited support for prototypal OO. Objects in Self support multiple prototype slots: you can add to an object without copying more stuff into it.
- masklinn 11y ago> Objects in Self support multiple prototype slots Which it calls parent slots[0], the prototype being the "template object" originally copied/cloned to make the current object[1]. [0] http://handbook.selflanguage.org/4.5/langref.html#parent-slots http://handbook.selflanguage.org/4.5/langref.html#parent-slo... [1] http://handbook.selflanguage.org/current/glossary.html http://handbook.selflanguage.org/current/glossary.html
- cmrdporcupine 11y agoConcatenative inheritance predates JS. There were research languages in the 80s that had this model as well. This book (2003) has a good summary of the space: http://www.amazon.com/Prototype-Based-Programming-Concepts-Languages-Applications/dp/9814021253 http://www.amazon.com/Prototype-Based-Programming-Concepts-L... There's a diversity of approaches. Self uses prototype delegates. The language I learned on (LambdaMOO) has a single-delegate ("parent") model. There have been research languages that used pure concatenation. And even ones that had early binding and static types.