4 ms·
I find these to be good points, but there is something missing for me that makes this "best possible scenario" only pretty good. JS is a notoriously quirky and
by mmartinson 7y ago
I find these to be good points, but there is something missing for me that makes this "best possible scenario" only pretty good.
JS is a notoriously quirky and inconsistent programming language. Clearly it's sufficiently usable for writing complex, powerful and reliable programs, but it's error-prone for non-experts and encourages programming patterns that make importing accidental complexity the norm.
For many programming situations it'd be easy to just pick a different language, but obviously thus isn't the case for writing browser-based programs.
The best possible scenario for me would somehow involve deprecation and removal of the nasty parts of JS, and a path towards a smaller, simpler, more consistent language. Right now it feels like the cost of backwards forever compatibility is paid every day, in every project, and it's completely wasteful, given that transpile and polyfill is widely considered best practice.
Whether this could the job of TC39 or some other institution could go either way for certain.
- bryanlarsen 7y agoTypescript removes some of the nastiest Javascript features. Of course that's not it's raison d'être and it includes a bunch of stuff you may not care for. However it is what is currently occupying the niche you're asking for. And it has all the advantages parent mentions.
- z3t4 7y agoJavaScript was very simple compared to most languages. Adding a bunch of extra syntax variants, different types of scoping rules, magic syntax has made the language overly complex. Thankfully you can still use the "good parts".
- deleted 7y ago[deleted]
- goto11 7y agoWhat parts of JS do you suggest removing? JS has its quirks, but it is not a particularly big language.