ES6 doesn't need opt-in
brendan at mozilla.com
Sat Dec 31 20:59:28 PST 2011
There is no 5.5 -- new features can be used from unversioned script, but those that break backward compatibility (old code running in new browser) must be inside a new special form that expresses explicit opt-in. This means
yield reserved in function*
let reserved in module body (however declared)
free variable error checking in module body
completion reform in module body
typeof null reform in module body (debatable)
Global code still can use new features such as module declarations. That means your "global = ES5" does not work. Do not linearize onto a version number line.
----- Original Message -----
From: "Axel Rauschmayer" <axel at rauschma.de>
To: "David Herman" <dherman at mozilla.com>
Cc: "es-discuss Steen" <es-discuss at mozilla.org>
Sent: Saturday, December 31, 2011 7:16:06 PM
Subject: Re: ES6 doesn't need opt-in
Each new feature can be considered independently. Anything that is only allowed within modules becomes a carrot to lead programmers to the improved semantics, but whenever we can compatibly make something available to global code, we should do so. No point needlessly depriving programmers of ES6 goodies such as destructuring or spread/rest.
I’m not entirely sure, but introducing two new dialects (ES5.5 and ES6, if you will) at the same time seems problematic. It might be easier to stick to the simpler rule of “global = ES5”.
Apart from that: sold.
Dr. Axel Rauschmayer
axel at rauschma.de
home: rauschma.de twitter: twitter.com/rauschma
es-discuss mailing list
es-discuss at mozilla.org
More information about the es-discuss