Hacker News new | past | comments | ask | show | jobs | submit login

You know that quip about C++ being an octopus made by nailing extra legs onto a dog?

Is the same phenomenon somehow tasteful when it comes to ECMAScript {({..., sy: nt => ax, ...}({,})} ?




I think C++ is the best example of where JS is heading.

We have different ways of doing the same thing, and you have to know the "right" and "wrong" ways based on whatever was the latest proposal.

We have fringe proposals that are just based on something cool some other language did, and they might stick or they might not.

We'll soon have the really obscure constructs that nobody uses except for this guy on the 3rd floor, and he's really vocal about it so watch out.

Maybe we'll even finally get macros in JavaScript [1] soon.

1: http://peter.michaux.ca/articles/macros-in-javascript-please


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?


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: