Array extras functionality for iterators

Yehuda Katz wycats at gmail.com
Tue Feb 28 09:06:50 PST 2012


Catching up on this discussion.

Personally, I'd like to see us come to quick consensus on `forEach` for
collections, because without something like `forEach`, it's impossible to
implement useful versions of these collections in user-space in browsers
that do not implement for-of.

Indeed, the current browsers that implement Map and Set do not implement
for-of, which means that even though browsers implement the collections
(and Mozilla has for a bit now), they are not very useful because they
cannot be iterated over. Had `forEach` been part of the initial spec, I
would be using them today.

One last thing: `forEach` on `Map` should probably pass the key and value
to the function.

Yehuda Katz
(ph) 718.877.1325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120228/744d95e5/attachment.html>


More information about the es-discuss mailing list