ES6 doesn't need opt-in

Brendan Eich brendan at mozilla.com
Mon Jan 9 10:36:25 PST 2012


On Jan 9, 2012, at 9:28 AM, Andreas Rossberg wrote:

> On 9 January 2012 16:54, Brendan Eich <brendan at mozilla.com> wrote:
>> The question is how bad these will be for anyone writing JS naively, based on current and emerging (ES6) docs, without explicit opt-in.
>> 
>> The answer entails at least:
>> 
>> 1. ES5-strict semantic changes, e.g. arguments aliasing, without early errors.
>> 
>> 2. Completion reform.
>> 
>> 3. New early errors.
>> 
>> I think 3 is a good thing and a non-problem. Some of us hope 2 is a matter of indifference to real-world code, but we don't know for sure. That leaves 1.
> 
> Yes, but (1) is not a trivial set -- e.g. receiver coercions, eval
> semantics, delete type errors, arguments aliasing, poisoning of
> caller/arguments, etc.

You're right, there's a lot of runtime meaning shift in ES5-strict, indeed -- more than just parameter no-aliasing.

Still the bet we are trying to place (not done yet detailing the proposal) is that most people won't use explicit version-based opt-in (also, such noise gets lost easily over the life of code snippets), *and* that the hard cases you cite are rare. None is common.

/be


More information about the es-discuss mailing list