Hacker News new | ask | show | jobs
by GlennS 2985 days 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?

1 comments

I 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.