Comment #27 on issue 164 by [email protected]: Wrong order in Object properties interation
http://code.google.com/p/v8/issues/detail?id=164

I’m for leaving it as-is. This allows for massive optimizations around `Array`s, and is nothing more than implementing the standard as-described. The *reason* the standard is vague about this, is to allow for exactly this sort of optimization; you *should not* be writing code that depends upon the order of keys. In fact, it’s “nice” of V8 to preserve insertion order of non-numerical keys for you; that, in and of itself, is *also* non-standard functionality. If anything, I’m against such a thing; people may make the mistake of relying on it, only to be bitten in the ass when they suddenly have two numerical keys in an `Object` that they’re using as an ordered associative array (which it’s not.)

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to