ES6 doesn't need opt-in

Brendan Eich brendan at mozilla.com
Wed Jan 4 16:56:05 PST 2012


How does |use es6| help for es7? It doesn't, especially if es7 has runtime-incompatible changes (i.e., is not a superset).

Better to dispense with modes or ordered versions altogether, which is the key idea of the proposal.

/be

Sent from my iPad

On Jan 4, 2012, at 4:45 PM, Axel Rauschmayer <axel at rauschma.de> wrote:

> I think I would prefer a simpler per-file approach. In light of having to do something like this again for ECMAScript.next.next how about the following?
> 
> First line:
> - "use strict"; //  before ES5: ignore; ES5: ES5.strict
> - use es6; // ES6: ES6
> - module <ident>? { is a synonym for use es6;
> 
> With JS language versions being such a prominent issue on the web, I wouldn’t mind seeing at first glance what kind of code I am looking at.
> 
> My idea might be completely off, but whatever the final solution, it should be dead-simple to explain.
> 
> On Jan 5, 2012, at 0:56 , Mark S. Miller wrote:
> 
>> (BTW I still think we want a real |use strict;| pragma, to choke old implementations.)
>> 
>> Yes. Crock suggested this in the old ES5 days and I think it is still a good idea:
>> 
>>     "use strict"; // still runs on old browsers, but non-strictly
>> 
>>     use strict;  // causes an early error on old browsers.
>> 
>> Had we adopting it into ES5, it would have this meaning clearly. It may still be a good idea, but consider the new complexity. Now the second form also causes an early error on old ES5 browsers, where the script might otherwise have been able to run strictly.
>> 
> 
> -- 
> Dr. Axel Rauschmayer
> axel at rauschma.de
> 
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
> 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120104/78c1e546/attachment-0001.html>


More information about the es-discuss mailing list