excluding features from sloppy mode
khs4473 at gmail.com
Wed Dec 26 22:30:13 PST 2012
First, maybe the "1JS" term is a bit confusing and should be retired.
I think a few simple rules are in order:
1) No opt-in required for new syntax, except:
2) No breaking changes for sloppy mode.
3) No implicit opt-in to strict mode.
Everyone agrees on rule #1. Rule #2 implies no "let" declarations in
sloppy mode, and no breaking block function semantics in sloppy mode. (Are
there others?) Rule #3 is probably the most controversial, but I think
If we have implicit opt-in to strict mode via new syntax:
- Figuring out what code is sloppy and what code is strict is going to end
up the domain of language lawyers. A casual user should not have to know
when a particular syntactic feature was added in order to know what are the
runtime semantics for that code. All a casual user should have to know is
to put "use strict' at the top of the file.
- Taking advantage of new syntax (perhaps in the head of a function) will
trigger completely unrelated semantic changes. This feels messy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss