Iteration (was: Re: Object.values and/or Object.forEach ?)

Axel Rauschmayer axel at rauschma.de
Sat Jun 8 22:39:35 PDT 2013


> As for having two versions of returning types (eager collection, lazy "gen"), yeah, also agreed, though don't see big reasons not to have both again, since we already have this in the languages as Object.keys(...). (Can you hear that question from a user: "oh, man, why they have provided Object.keys(..), but not Object.values(...)?"? I do.

I never needed Object.values(), but the same argument applies to Object.entries().

Another thing to keep in mind: we should migrate to modules, so I’d want those kinds of utility functions to be in a module and not part of the pseudo-namespace Object.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130609/3174c4a7/attachment-0001.html>


More information about the es-discuss mailing list