Hacker News new | ask | show | jobs
by illiarian 1204 days ago
Because they awkwardly bolted C++-like class syntax on top of prototype-based language and are now fighting that.

Same goes for methods that you have to manually bind to `this` in the constructor etc.

It literally is one of the "they didn't think if they should" parts of the language.

1 comments

This is why I appreciate TypeScript, as it fixes a lot of Javascript’s syntactic goofiness, but of course I can’t use it natively, which takes it off the table for some projects.