On 7/30/10 14:10, Brendan Eich wrote:
On Jul 30, 2010, at 12:06 PM, felix wrote:

actionscript 3 has
for (key in a) {}
for each (val in a) {}

This is from ECMA-357, E4X, and it is in SpiderMonkey and Rhino too --
it's not original to AS3.

It's also something we agreed (crock too, IIRC) was too vague: "each"
does not scream "value, not key".

oh, right, forgot about e4x.

Of course this does not say what the syntax for a meta-programmable
iteration construct should be, but laziness suggests "all" is not
precisely on target.

so why not make it "for each"? for-each iterates over a stream, and in the case of arrays the stream is the array values.

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

Reply via email to