> Le 27 nov. 2014 à 16:26, Axel Rauschmayer <[email protected]> a écrit : > > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys > > <https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys> > > The method `[[OwnPropertyKeys]] ( )` of proxy objects returns an actual > `List` to JavaScript code. Does that make sense? I thought it was a > specification(-only) type? How an instance is created is vague [1], which is > appropriate for a data structure at the specification level, but not for one > at the base level. `Array` seems like a better choice here. Or an iterator. > > [1] > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createlistfromarraylike > > <https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createlistfromarraylike> >
Lists are indeed specification-only types, and the result of the `[[OwnPropertyKeys]]` internal method call is never directly observed by the programmer: it is only used as an intermediate result within algorithms. A List is, I presume, a finite ordered sequence of values. —Claude > -- > Dr. Axel Rauschmayer > [email protected] <mailto:[email protected]> > rauschma.de > > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

