3 ms·
ES2015 doesn't have classes, it has a class statement which desugars to prototypal inheritance. And as Self demonstrated long before Javascript even existed, p
by masklinn 11y ago
ES2015 doesn't have classes, it has a class statement which desugars to prototypal inheritance.
And as Self demonstrated long before Javascript even existed, prototypal inheritance is neither bizarre nor verbose let alone dangerous. As with most other things, Javascript just has a completely mangled version of it for (I can only assume) original implementation simplicity.
- cmrdporcupine 11y agoYes I find it very unfortunate that 99% of people's exposure to 'prototype inheritance' is JS's rather inelegant form of it. Though like many things with JS if you are disciplined it can be used elegantly.
- deleted 11y ago[deleted]