Day 2 meeting notes

felix felix8a at
Fri Jul 30 14:47:44 PDT 2010

On 7/30/10 14:37, Brendan Eich wrote:
> For Harmony, we do not propose to standardize |for each|. Instead, the iteration and array comprehensions proposals for Harmony (see the wiki) propose that programmers choose keys, values, items (properties), or other iteration protocols by saying what they mean more precisely on the right-hand side of 'in':
> for (k in keys(o)) ...
> for (v in values(o)) ...
> for ([k, v] in properties(o)) ... // Python's "items"
> This seems better in TC39 members' views than adding ambiguous 'each' as a contextual keyword.

I'm wary of that because this looks to me confusing:
    a = keys(o);
    for (k in a) ...

or is keys(o) special syntax that only works within a for() statement?

More information about the es-discuss mailing list