Future proof "use strict";
michael at susens-schurter.com
Fri May 22 14:54:53 PDT 2009
I'm just a lowly Python/JS webdev eager to use ES5. John Resig
encouraged me to post this suggestion, so blame him if its no
For the record: my 2 original comments on "use strict"  
Essentially my fear is that the meaning of "use strict" becomes
ambiguous when future versions of ECMAScript are released (6 and
What seems reasonable for both ES users (webdevs) and implementors is
for ES engines to support only 2 modes: strict and permissible,
supporting fine-grained per-ES-version language support would cause
undue complexity for implementors.
However, when ES users enable the strict mode, they have a specific ES
version in mind (right now 5, but in the future perhaps 6, 5.1, etc).
Based on the 2 reasonable modes model I describe above "strict ES v5"
should be evaluated in the *permissible* mode by future ES versions.
Therefore, ES users need a way to define an ES *version* to target.
This could be as simple as: "use strict 5"; which could even be used
alongside the current "use strict"; right now.
A more robust model might be to allow the mode to be defined in a
if (ecmascript.version <= 5) "use strict";
As a side note, it would be nice if some sort of strictness stability
were to be guaranteed like API/ABI stability within major ES versions.
So that ES 5.1 strict == ES 5 strict != ES 6 strict.
Like I said, I could be way off base here. I'm joining the discussion a
bit late and only from the perspective of an ES user. :-)
schmichael on IRC, Twitter, etc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part
More information about the es-discuss