3 ms·
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 manual
by illiarian 4y 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.
- temporallobe 4y agoThis 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.