Maybe we need a reflect API to iterate over instance members

Tom Van Cutsem at
Mon Jun 1 18:10:36 UTC 2015

2015-06-01 8:38 GMT+02:00 Domenic Denicola <d at>:

> From: es-discuss [mailto:es-discuss-bounces at] On Behalf Of
> Gray Zhang
> > I’m just wondering is there any reason that Reflect API is not suitable
> to provide such functionality?
> Reflect currently contains only methods which correspond to proxy traps.
> There has been talk of extending it beyond that, but making that first step
> is going to be a hurdle for whoever’s proposing it to extend it.

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.
There are many utility methods one may want to add on top, but it seems
better to wait and see what the community comes up with rather than to try
to codify an extensive API before it has seen any significant use.

Regarding duplicates: ES6 has Sets. It should be fairly straightforward to
adapt the above example to de-dup inherited property names.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list