When Object.keys is called in @v8js, no guarantees are made about the order of the keys in the returned array. In practice, they are sorted alphanumerically on the first ten characters of the key. Why ten? Twelve would be nice. Sixteen is also a nice number.
Exactly! The PR I pointed to fixes the spec to match existing implementations. (Currently, the spec uses integer indices instead of array indices, which essentially moves this cut-off point to a higher number, but no one implements that.)
-
-
Cool, thank you so much! I should have seen it under 6.1.7 in the spec. How lucky am I that you saw my tweet?
-
Right back at you! Your comments were helpful; they confirmed that increasing this seemingly arbitrary number limit to a greater number would still be confusing, just in a different way. (I tried to make that point here: https://github.com/tc39/ecma262/pull/1242#issuecomment-399687202 … but it didn’t seem to land.)
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.