On Thu, Jul 11, 2013 at 3:31 PM, Andrea Giammarchi
<[email protected]> wrote:
> I've noticed by accident Maps and Sets (simple?) now uses generators so that
> no polyfill will ever work anymore and Sets are pointless since there's no
> way to retrieve back values in any shim.
>
> I'll drop my es6-collections polyfill and take care of a pointless WeakMap
> shim only at this poit ... wondering what's Mark M. take on this since he
> was taking care of other polyfills for closure too.
>
> http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets

I'm not sure what you think is happening, but there's nothing that
defeats a polyfill in Map or Set.

As Arv says, it's allowed to pass an iterable in their constructor,
but you can ignore that if you want.

The .keys/values/entries() methods return iterators, but you can
easily polyfill that if you'd like.

Both of them have .forEach() methods which just take a callback,
exactly like Array#forEach().

~TJ
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to