iteration order for Object

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Mar 10 17:03:31 PST 2011


On Mar 10, 2011, at 3:48 PM, Charles Kendrick wrote:

> This seems to have been most recently discussed in 2009 with inconclusive results.
> 
> 	https://mail.mozilla.org/htdig/es-discuss/2009-October/010060.html
> 

See thread starting at: 
https://mail.mozilla.org/pipermail/es-discuss/2010-December/012459.html


> I have summarized the argument for this feature below - this argument has swayed others who were initially opposed.
> 
> I'm hoping we can get quick consensus that *specifically Object iteration order* should be preserved, without getting too bogged down in the details of specifying exactly what happens for Arrays, prototype chains, etc.  Major stakeholder agreement on this one aspect should be enough to prevent any other vendors from shipping browsers that break sites, and get the Chrome bug for this re-instated.
> 

But those details are exactly the situations that break interoperability.

In https://mail.mozilla.org/pipermail/es-discuss/2010-December/012469.html I identified scenarios where you can expect to get interoperable enumeration order among all major objects:
	The object has no inherited enumerable properties
	The object has no array indexed properties
	No properties have been deleted
	No property has had its attributes modified or been changed from a data property to an accessor property or visa versa
The distinction you make between Arrays and Objects isn't one that necessarily exist at the implementation level. Are you suggesting that for all objects other than Array instances that array indexed properties must enumerate in insertion order? Chrome isn't the only browser where that currently isn't true.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110310/ec8bdf6a/attachment.html>


More information about the es-discuss mailing list