The more I think about this, the more convinced I get that all new syntax and breaking changes (where possible) should be strict-mode only. In retrospect, `let[x] = y;` changed everything. Here's why I think "1JS under strict" is the best solution:
- How exactly would one teach that classes, arrows, etc. are all available in sloppy mode, but "let" is not? The reason is obscure for a casual user. It's going to seem arbitrary. On the other hand, "1JS under strict" is quite easy to teach. - It creates a clean, linear evolution for javascript syntax: ES3 > ES5 strict > ES6 > ES7. - It eliminates the so-called "micro-modes" in function heads. - It gets everyone moving in the same direction: strict mode. - It eliminates subjective questions about what constructs should be implicitly strict. To be clear, I'm proposing that: 1) All new syntax and breaking changes (where possible) are strict-mode only. 2) Modules and only modules are implicitly strict. Why not? Lurkers out there! Would anyone be opposed to opting-in to new ES6 syntax by either (a) "use strict" or (b) modules? { Kevin }
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss