Maybe we need a reflect API to iterate over instance members

Tom Van Cutsem tomvc.be at gmail.com
Tue Jun 2 19:55:24 UTC 2015


2015-06-01 20:36 GMT+02:00 Alexander Jones <alex at weej.com>:
>
>
> On Monday, June 1, 2015, Tom Van Cutsem <tomvc.be at gmail.com> wrote:
>
>>
>> Or since Proxy traps correspond 1-to-1 to the "internal methods" in the
>> spec, the primary goal of the Reflect API was to expose the essential
>> methods that make up Javascript's object model as defined by the spec.
>>
>
> I like this definition. Is it written down? (I need ammunition for
> Reflect.type(x)!)
>

There's some rationale on the original wiki page for the reflect API: <
http://wiki.ecmascript.org/doku.php?id=harmony:reflect_api#purpose>.

We also had a related short debate on this list 3 months ago, see <
https://esdiscuss.org/topic/reflect-getownpropertysymbols#content-0>, in
particular, Allen's comment: "In ES6, the primary role of the Reflect
object is to provide direct access to an object's essential internal
methods".

Regards,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150602/fa44620d/attachment.html>


More information about the es-discuss mailing list