On Jul 30, 2010, at 2:37 PM, 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.

In case it's unclear, these keys, values, etc. iterator factories are "just 
functions". Of course their names would not be reserved identifiers, and they 
wouldn't be global functions. The reader should assume they've been imported 
from a standard module.

/be

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to