ES6 doesn't need opt-in

Brendan Eich brendan at mozilla.com
Tue Jan 3 16:08:04 PST 2012


On Jan 3, 2012, at 1:24 PM, Mark S. Miller wrote:

>                            Just Two Modes

V8 folks the other year had a catchier version: "no more modes".


> * ES6 non-strict mode must be practically upwards compatible from ES5 non-strict mode.

This is the part that's not clearly agreed to, or perhaps not even clearly proposed yet.

Dave alluded to how we can decide on a case-by-case basis how new syntax using already-reserved (since ES1) keywords could be meaningful in <script> (no version) if the engine supports ES6 (or ES7, later, etc.).

For example, class. *If* we support class in ES6, why shouldn't it be usable at top level not in a module (via module{...} or |use module;|)? The syntax is a guaranteed error in downrev engines.

Same for destructuring, rest/spread, etc. as I've mentioned in recent messages.

Why you write "upwards compatible" you may mean something other than what's defined at

http://en.wikipedia.org/wiki/Forward_compatibility

viz, new code degrades gracefully on old engines. If you mean that old code runs in new engines without changed semantics, that is downward or backward compatibility. I'm not sure what you meant so I'll stop here.

/be


More information about the es-discuss mailing list