Versioning?

Rick Waldron waldron.rick at gmail.com
Mon Dec 19 10:54:40 PST 2011


Mark, It 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"

Rick

On Mon, Dec 19, 2011 at 1:48 PM, Mark S. Miller <erights at google.com> wrote:

>
>
> On Mon, Dec 19, 2011 at 10:21 AM, Xavier MONTILLET <
> xavierm02.net at gmail.com> wrote:
>
>> Why
>>
>> use version 6;
>>
>> and not
>>
>> "use version 6";
>>
>> ? Just to be sure ES 6 code breaks in old browsers ?
>> And what do you mean by "opt-in for ES6" ? New syntax ? Everything in ES
>> 6 ?
>>
>> I'm thinking about weakmaps:
>> - on the one hand, you want to use native weakmaps when available so
>> you would want to "opt-in for ES6"
>> - but on the other hand, you could also implement a weakmap "polyfill"
>> that wouldnt be as efficient, that would suck the memory but still
>> work, and have it work in older browsers
>>
>
>
> http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/WeakMap.js
> is a WeakMap polyfill that should work *transparently* in all ES5
> conformant browsers. It is indeed not as efficient, but it's better than
> you might expect ;).
>
> Btw, where does the term "polyfill" come from?
>
>
>
>
>>
>> Therefore, setting the thing to do to "opt-in for ES6" to something
>> not backward compatible doesn't seem like a good idea to me.
>>
>> On Mon, Dec 19, 2011 at 1:42 PM, David Bruant <bruant.d at gmail.com> wrote:
>> > I did start a related thread a while ago [1].
>> >
>> > Brendan's response [2] explained a few things:
>> > "Please read RFC 4329:
>> >
>> > http://tools.ietf.org/html/rfc4329
>> >
>> > There will be *at least* a ;version=6 parameter you can use, probably
>> > with either application/javascript and application/ecmascript -- I have
>> > argued that we should align version numbers."
>> >
>> >
>> > "Beyond the RFC 4329 version= parameter, we also want a pragma for
>> > in-script-content version assertion:
>> >
>> >  use version 6;"
>> >
>> > See the full response [2] for full context.
>> >
>> > Besides an es-discuss thread, I think that what is really needed is an
>> > harmony proposal. How to opt-in for ES6 is outside of the scope of pure
>> > ECMAScript (especially if it's with playing with the HTML script tag
>> > @type attribute), but let's face it, web devs need this information and
>> > a wiki page on the topic would be handy.
>> >
>> > At the time of reading Brendan's response, I didn't have anything to add
>> > on that and I still don't. Unlike HTML and CSS, JavaScript needs new
>> > syntax features. Syntax features that are NOT backward compatible with
>> > ES3. If you use one of these features, your script break in older
>> > browsers (unlike new HTML elements and CSS rules).
>> > I don't see an alternative to versionning. Smarter people are welcome to
>> > jump in, I guess.
>> >
>> > David
>> >
>> > [1]
>> https://mail.mozilla.org/pipermail/es-discuss/2011-August/016262.html
>> > [2]
>> https://mail.mozilla.org/pipermail/es-discuss/2011-August/016267.html
>> >
>> > Le 19/12/2011 11:49, Peter van der Zee a écrit :
>> >>
>> https://lists.webkit.org/pipermail/webkit-dev/2011-December/018924.html
>> >>
>> >> ``use version 6;``
>> >>
>> >> In which thread on esdiscuss should I have read about that?
>> >>
>> >> - peter
>> >> _______________________________________________
>> >> es-discuss mailing list
>> >> es-discuss at mozilla.org
>> >> https://mail.mozilla.org/listinfo/es-discuss
>> >
>> > _______________________________________________
>> > es-discuss mailing list
>> > es-discuss at mozilla.org
>> > https://mail.mozilla.org/listinfo/es-discuss
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
>
> --
>     Cheers,
>     --MarkM
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111219/84c4918c/attachment.html>


More information about the es-discuss mailing list