On Jan 5, 2012, at 10:38 PM, Luke Hoban wrote:
> ...
> # Why ‘implicit explicit opt-in’ doesn’t seem reasonable #
>
> The prevalent alternatives presented in this thread are variations of
> “implicit explicit opt-in”, where use of some new syntax causes some part of
> the code inside or outside of it to start behaving differently (breaking
> changes). I think in practice this will be very confusing. Take this:
>
> var x = typeof null;
> module {
> var y = typeof null;
> x == y // false!
> }
>
Note that my most resent postings were suggesting a different form of "implicit
explicit opt-in": use of new syntax causes all of the code in the same source
file to potentially behave differently
var x = typeof null;
module {
var y = typeof null;
x == y // ----->true!
}
In practice, I agree that we don't want to make such a breaking change for
typeof. But this approach would allow to make "strict mode semantics" be
implicit for any source file that uses any new ES6 syntactic features.
Allen
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss