Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Boris Zbarsky
On 4/19/14, 4:38 PM, Charles Kendrick wrote: However, for the record, I continue to think that special treatment of numeric keys is a really bad design for property order for Objects (for Arrays, it's fine). In practice people use plain objects as arrays (i.e. setting indexed properties on

Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Andreas Rossberg
On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I'm in the middle of updating the spec. of [[OwnPropertyKeys]] to returns an Array rather than an Iterator. While doing this I realized that because [[OwnPropertyKeys]] is essentially a new MOP level operation we have the

Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Allen Wirfs-Brock
On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote: On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: The ordering I propose is: 1) All array index property keys, in ascending array index numeric order. Followed by: 2) All other string property keys, in property

Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Andreas Rossberg
On 22 April 2014 16:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote: On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: The ordering I propose is: 1) All array index property keys, in ascending array index numeric

Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Allen Wirfs-Brock
On Apr 22, 2014, at 8:45 AM, Andreas Rossberg wrote: On 22 April 2014 16:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote: On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote: The ordering I propose is: 1) All

Re: [[OwnPropertyKeys]] key ordering

2014-04-22 Thread Mark S. Miller
I would prefer that this implementation limit be treated even more like the stack limit; say by throwing an error rather than silently adding a 1+2^24 property that breaks the contract. Any reason not to throw an error on this? That said, I agree that this should be an implementation limit rather

Re: [[OwnPropertyKeys]] key ordering

2014-04-19 Thread Allen Wirfs-Brock
On Apr 19, 2014, at 12:17 PM, Brendan Eich wrote: Did you check against http://wiki.ecmascript.org/doku.php?id=strawman:enumeration which links off to this es-discuss thread: https://mail.mozilla.org/pipermail/es-discuss/2011-March/012965.html Sounds good, just asking for a look-back

Re: [[OwnPropertyKeys]] key ordering

2014-04-19 Thread Charles Kendrick
The proposed ordering for [[OwnPropertyKeys]] is the same as the current for..in ordering in the latest versions of most browsers. As Allen pointed out, this group has basically declined to specify for..in ordering, and specifying an order for [[OwnPropertyKeys]] *technically* leaves for..in