4 ms·
I'm not sure that I agree that it was a shortcut for the original creators or older users of JS. Lots of people (myself included) built stuff using self-style p
by kerkeslager 7y ago
I'm not sure that I agree that it was a shortcut for the original creators or older users of JS. Lots of people (myself included) built stuff using self-style prototypical inheritance and argued against adding Java-style classes and inheritance, since they pollute the cleaner prototypical model with a bunch of inconsistencies (not necessarily worse, just inconsistent). We only really lost that argument with ES6 about 4 years ago.
- masklinn 7y ago> I'm not sure that I agree that it was a shortcut for the original creators or older users of JS. There literally were no users when the object system was created. > they pollute the cleaner prototypical model Javascript’s « prototypal » model is not in any way clean, and all ES6 does is add useful and convenient syntactic shortcuts. The changes to the underlying model are improvements (eg official read/write access to the one lonely parent slot, ability to create objects without a parent, …)
- kerkeslager 7y ago> There literally were no users when the object system was created. True, but it's odd that you say that as if it is disagreement with what you quoted. > Javascript’s « prototypal » model is not in any way clean, What's not clean about it? > and all ES6 does is add useful and convenient syntactic shortcuts. ES6 added shortcuts that are only useful and convenient if you didn't bother to learn the prototypical inheritance way of doing things, and wanted to do the things in the Java class-based style. > The changes to the underlying model are improvements (eg official read/write access to the one lonely parent slot, ability to create objects without a parent, …) Sure, agreed I guess.