On Jan 4, 2012, at 8:39 AM, Mark S. Miller wrote:

> Here's an interesting compromise I consider perfectly reasonable. We don't 
> *mandate* any ES6 code features be available in ES6 non-strict mode. But we 
> don't prohibit them either. For any ES6 features that have no dependence on 
> mode, like destructuring, we mandate that they be present in strict code, and 
> we make them normative optional (the new Appendix B category) in non-strict 
> code.

Too complicated. Why not just have "one JavaScript" (modulo ES5 strict mode, 
whether its selection was explicit or implicit)?


> Implementors are free to implement them or not in non-strict mode, but if 
> they implement them, it must mean the same thing as the mandated meaning in 
> strict code.

We need interop on the web. If we let implementations vary as to whether, e.g., 
rest parameters require "use strict", then I predict the implementations that 
*do not* require "use strict" will win, and we'll have to spec normative 
non-optional anyway.

I'm very sure developers will not want "use strict"; as a requirement. That 
battle has been lost already with most developers (the war goes on, but let's 
not refight unnecessarily).

Anyway, predictions aside, I do not agree we should require "use strict" if the 
syntax speaks for itself.

My argument is not against strict mode (the basis of Harmony!) but rather 
against requiring "use strict"; directives to use new features that can be 
expressed without incompatible meaning shifts (only with guaranteed early 
errors in pre-Harmony implementations).

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to