iteration order for Object

David Bruant bruant at enseirb-matmeca.fr
Sat Mar 12 12:55:10 PST 2011


Le 12/03/2011 21:24, Allen Wirfs-Brock a écrit :
> On Mar 12, 2011, at 11:58 AM, David Bruant wrote:
>
>> 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. My point
>> was just that if we standardize the order as in the strawman, we will
>> have lost forever the possibility to retrieve overall property order...
> No you haven't.  There is nothing stopping somebody in the future from proposing:
>      Object.keyInCreationOrder(obj)
I spoke too quickly indeed.
This wouldn't however solve the problem with the proxy not being able to
implement reliably OrderedObject, because of the dependency
Object.defineProperties has on the internal iteration order.

David


More information about the es-discuss mailing list