3 ms·
They ended up having to add classes (albeit as syntactic sugar). Argue its advantages all you want, but I'd say that's representative of what a failure it's be
by mattmanser 9y ago
They ended up having to add classes (albeit as syntactic sugar).
Argue its advantages all you want, but I'd say that's representative of what a failure it's been. One of the last languages supporting prototype-based inheritance has basically given up on it.
Personally, I find it an awkward way to try and encapsulate code, generally, it has terrible performance to boot.
- Raphmedia 9y agoWas there ever any issues with prototype-based inheritance? I've always assumed that they added classes simply because of stubborn classical-based programmers who couldn't bother to learn JavaScript correctly.
- spinningarrow 9y agoThat was my impression as well, especially since the class-ish syntactic sugar doesn’t improve performance either.
- MoTTs_ 9y ago> One of the last languages supporting prototype-based inheritance... Actually, all this time, both Python and Ruby use what we would call prototype-based inheritance. https://www.reddit.com/r/node/comments/6oqiyn/is_es6_completely_useless/dkjjh7t/ https://www.reddit.com/r/node/comments/6oqiyn/is_es6_complet... https://www.reddit.com/r/learnjavascript/comments/6c6use/how_the_hell_did_you_guys_learn_js/dhuut92/ https://www.reddit.com/r/learnjavascript/comments/6c6use/how...