5 ms·
why no one proposes as feature a header to make javascript strict with the newest standard and deprecate and drop compatibility from previous versions in the ne
by nudpiedo 8y ago
why no one proposes as feature a header to make javascript strict with the newest standard and deprecate and drop compatibility from previous versions in the newer ones?
Or even just complete support for asmjs with interop and program in completely other languages, especially since the person who wrote this seems to want to program in languages with different semantics...
- amitport 8y agoThe title is "Future JavaScript: what is still missing?"- he's talking about new language features. I wouldn't expect him to discuss "dropping compatibility" and "completely other languages"
- nudpiedo 8y agoMy point is, why continue bloating javascript if its main weakness are some of its historical design issues (preserved only for backwards compatibility.)
- burlesona 8y agoYes, this is a big issue for JS. So much effort is spent trying to make JavaScript be some other language instead, by developers who are stuck building stuff in JavaScript because they want to run it in the browser. At this point programming in other languages makes more sense and is arguably a better vision for “the future of JavaScript.”
- nudpiedo 8y agoActually it is a pity that so many languages compile to JS but have an FFI which is not really friendly towards the programmer or that requires some code to write adaptors etc. Let's see how it evolves with asmjs.
- Vinnl 8y agoWhat is the goal you want to achieve with this? If just programmer discipline, then that's what many people use linters for.
- nudpiedo 8y agoI do not think discipline is a reliable factor in many aspects... once you try a good compiler or a well designed/consistent API there is no way back. Look for example at C++, no one knows all of it and the newer a developer is the more they want to use all its features, and then there are the templates... which do not add much of clairity or sanity.
- Vinnl 8y agoThat's why people use linters: to enforce that discipline. No need for a special language keyword.
- _ZeD_ 8y agoIsn't enough the "strict mode"? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- nudpiedo 8y agohonestly, I would see dropping features and select a leaner ES6+ version within the html tag as a very good "feature". The strict mode also does not fix some historical inconsistencies and design bugs just preserved for compatibility, for example methods on default arrays vs methods on the querySelector results.