3 ms·
Well , not anymore since ES2015 has classes,class inheritance,super and co. Prototypical inheritance is bizarre, verbose and dangerous.
by aikah 11y ago
Well , not anymore since ES2015 has classes,class inheritance,super and co. Prototypical inheritance is bizarre, verbose and dangerous.
- masklinn 11y agoES2015 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]