ES6 doesn't need opt-in

Brendan Eich brendan at mozilla.com
Fri Jan 6 12:29:50 PST 2012


On Jan 6, 2012, at 12:09 PM, Axel Rauschmayer wrote:

>> Rather, we should minimize the state machine and how we talk about it. We could generalize it using Curr, Next, Curr&Next, and Curr-Next labels.
> 
> I’m awfully sorry for belaboring this point. But the labels and the quote below don’t go together.
> 
> Quoting Brendan:
> 
>>> - ES6 is a superset of ES5.strict.
>> 
>> That's always been promised.
> 
> 
> Then I would only expect two labels: ES6 and non-strict

You're counting different beans from Mark's "modes" and from Allen's states.

The reason the state machine matters is implementation (including the fine spec, the normative implementation). Authors can think of writing non-strict ES5 or lower, or ES5 strict -- or ES6 if they use a bit of novelty. Different beans again.

I'm not sure what informs your label count expectation. In writing JS for the web over the next several years, you might have to worry quite a bit about ES5 strict vs. ES6. You can't just assume ES6 works everywhere that ES5 strict works.

/be


> 
> ES6-only => (a subset of) ES6
> ES5-only => only possible for non-strict constructs => non-strict
> ES5&ES6 => (a subset of) ES6
> ES5~EAS6 => not possible  (“The construct has identical syntax and static semantics in both ES5 and ES6, but differing semantics.”)
> 
> -- 
> Dr. Axel Rauschmayer
> axel at rauschma.de
> 
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
> 



More information about the es-discuss mailing list