Brendan Eich wrote:
> On Apr 25, 2008, at 2:08 PM, Brendan Eich wrote:
>
>> for (prop in obj) {
>> ... obj[prop] ...
>> }
>>
>> to look like
>>
>> for each (value in obj) {
>> ... value ...
>> }
>>
>> where obj might be an Array. The symmetry between for-each-in and for-
>> in that E4X half-supports (viz, prototype property enumeration with
>> shadowing, and deleted-after-loop-starts coherence) is broken.
>
> Just in case this is not well-known, SpiderMonkey starting in Firefox
> 1.5 supported E4X and made the for-each-in loop work for all object
> types, not just XML/XMLList. But not on Array element (indexed
> property) values only, in index order -- again property creation
> order, and named as well as indexed enumerable properties, are
> visited. This shares code with for-in and preserves the equivalence
> shown in the rewrite example above.
I'm baffled trying to figure out what you're trying to say in the last
paragraph.
Waldemar
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss