Versioning?

Xavier MONTILLET xavierm02.net at gmail.com
Tue Dec 20 02:34:21 PST 2011


I was speaking of ES 5 + "use strict"; since it needs you to opt-in.
ES 5 itself doesn't.

> Given the nature of the changes in ES6 I'm not sure that there will be much scope to write code that benefits form utilizing ES6 and yet would still run on a browser supporting only ES5.  If you want to write code that will run on an browser that only supports ES5, I think you will find you need to stick to writing ES5 code.

Weakmaps, private names, optimized arrays are all much better in ES 6
but could be (kind of) implemented in ES 5.

On Tue, Dec 20, 2011 at 11:28 AM, Gavin Barraclough
<barraclough at apple.com> wrote:
> On Dec 20, 2011, at 1:38 AM, Xavier MONTILLET wrote:
>
>> "use version 6"; with ({hi:"Hi!"}) alert(hi);
>>
>> It will throw an error and this is what you want it to do. Just like
>> when you used "use strict";
>
> No, that is not what this program is spec'ed to do in ES5.  In a conforming ES5 implementation, this program will alert "Hi!".
> If you make a browser that throws an error on receiving this input, it is not ES5 conformant.
>
>> use version 6;
>>
>> to opt-in, then you CAN NOT write backward compatible code while using
>> some ES6 features (even those that can be polyfilled)...
>
> Given the nature of the changes in ES6 I'm not sure that there will be much scope to write code that benefits form utilizing ES6 and yet would still run on a browser supporting only ES5.  If you want to write code that will run on an browser that only supports ES5, I think you will find you need to stick to writing ES5 code.
>
> G.
>
>


More information about the es-discuss mailing list