2 ms·
I feel like JavaScript is already a sort of functional language, so going in this direction is ok. It's the object/class additions where I think it's all going
by GlennS 9y ago
I feel like JavaScript is already a sort of functional language, so going in this direction is ok.
It's the object/class additions where I think it's all going a bit C++.
Start with prototypical inheritance, but with a Java-style `new` keyword that makes everything confusing. Next bolt on classes on the one hand, while correcting your prototype system `Object.create` on the other.
R has 3 different object systems and none of them are any good. How long before JavaScript catches up?
- sjellis 9y agoI think that one of the reasons that classes were added to the language was that people kept implementing them anyway, so it was better to standardise. This may be a good thing: JavaScript arguably has to be multi-paradigm, more than other languages, because the user-base is so diverse.