Is `List` really a specification type?
Claude Pache
claude.pache at gmail.com
Thu Nov 27 08:12:51 PST 2014
> Le 27 nov. 2014 à 16:26, Axel Rauschmayer <axel at rauschma.de> 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
> axel at rauschma.de <mailto:axel at rauschma.de>
> rauschma.de
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141127/41ec07dc/attachment.html>
More information about the es-discuss
mailing list