Comment #108 on issue 164 by [email protected]: Wrong order in Object properties interation
http://code.google.com/p/v8/issues/detail?id=164
I just want to applaud google for, thus far, sticking to their principles. This is NOT a bug. People who expect key-value objects to preserve order of keys are bad coders. Period.
I you want ordered data, use a standard array (numerically indexed starting at 0). If, instead, you look up data by key values one at a time, use a key-value pairing. It's very easy.
@theasp: LinkedList and LinkedSet are NOT key-value objects. The difference between arbitrary key value pairings and indexed arrays exists conceptually, beyond languages. But it also exists explicitly in Java. Thus it makes sense for LinkedSet and LinkedList to be ordered and preserve this. LinkedHashSet is an exception to most of the Java rules. Ordinarily in java a Map implementation (HashMap, Hashtable, etc) do NOT preserve order of keys.
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
