Versioning?

Xavier MONTILLET xavierm02.net at gmail.com
Tue Dec 20 01:38:53 PST 2011


@Gavin Barraclough :

I don't get the point of having the code break in old browsers...
When you use this code:

"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";
Of course, it would work in old browsers and not in new because they
would know with isnt allowed anymore. But again, that's what i expect:
When i dev in new browsers, it tells me what is bad and when I put it
on old browser, they just don't care and have it work.

But if you use:

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)...

On Tue, Dec 20, 2011 at 12:16 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
> My understanding:
> - Shim: retrofit a new API in an older context.
> - Polyfill: “A shim that mimics a future API providing fallback
> functionality to older browsers.”
>
> On Dec 19, 2011, at 19:54 , Rick Waldron wrote:
>
> Mark, It [polyfill] was coined by Remy
> Sharp http://remysharp.com/2010/10/08/what-is-a-polyfill/
>
> ...I still don't understand how it differs from "shim"
>
>
> --
> Dr. Axel Rauschmayer
> axel at rauschma.de
>
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list