3 ms·
” the prototypal inheritance model is in fact more powerful than the class based model. It is, for example, fairly trivial to build a class based model on top o
by discreteevent 12y ago
” the prototypal inheritance model is in fact more powerful than the class based model. It is, for example, fairly trivial to build a class based model on top of a prototypal model, while the other way around is a far more difficult task”
This is precisely what Kay is arguing against in his second point. In Smalltalk everything is an object including classes but there is a sharp distinction between a class and other objects and it's very important to make this distinction. It's important to be explicit about which level you are operating on.
In general arguments about one thing being better than another because you can express one in terms of another don't hold up. Then you can argue that assembly is the most powerful of all. (see also the definition of Turing Tar Pit)
- frik 12y agoNot really. Your first paragraph is also true for JS (think of ES6 "class" syntactic sugar). Some browsers implement the DOM in JavaScript (https://www.chromium.org/blink/blink-in-js https://www.chromium.org/blink/blink-in-js, http://www.phantomjs.org/ http://www.phantomjs.org/, https://github.com/andreasgal/dom.js https://github.com/andreasgal/dom.js). And there are things like asm.js and even Linux VM running in JavaScript (http://bellard.org/jslinux/ http://bellard.org/jslinux/). JavaScript/ECMAScript is one of the most misunderstood languages, please read up before jump at conclusions.