iteration order for Object

David Bruant bruant at enseirb-matmeca.fr
Sat Mar 12 12:43:25 PST 2011


Le 12/03/2011 20:58, David Bruant a écrit :
> Le 12/03/2011 19:41, Brendan Eich a écrit :
>> On Mar 12, 2011, at 9:54 AM, David Bruant wrote:
>>> The little "issue" I see in returning 1) index properties in ascending
>>> order 2) all other properties in addition order is that there is a bit
>>> of information lost in the process: overall property addition order
>>> (index properties included).
>> This is an issue in theory. Beware _a priori_ reasoning about usability issues.
> I fully agree. I don't have myself a decent use case for that. (...)
I have thought of a use case:
Music album in which one title is a number. I lose the opportunity to
store the album as a dictionary indexed on titles and sorted the order I
have inserted the keys in. I would be forced to use an array. This is
where the notion of dictionary finds some limitation.

David, bad faith indeed :-)

Ps : And yes, there are such albums:
Moby - 18 - 18
Moby - Ambient - 80
Moby - Play - 7 (Moby's good at this game)
Phoenix - Wolfgang Amadeus Phoenix - 1901
Coldplay - Viva la Vida or Death and All His Friends - 42
Lily Allen - It's Not Me, It's You - 22
...


More information about the es-discuss mailing list