Re: The enumerate trap and Object.create()

2015-02-02 Thread Leon Arnott
The bug has been filed: https://bugs.ecmascript.org/show_bug.cgi?id=3724 Thanks. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: The enumerate trap and Object.create()

2015-01-30 Thread Gary Guo
Seems a serious problem, but could be easily fixed (I think). For Example, this could be used as [[Enumerate]] for ordinary objects: 9.1.11 [[Enumerate]]([visitedSet]) When the [[Enumerate]] internal method of O and optional argument visitedSet is called the following steps are taken Return an

Re: The enumerate trap and Object.create()

2015-01-30 Thread Brendan Eich
Good catch! I think this old decision pre-dates for-of. Cc'ing Tom. Leon, could you please cite the bug in a followup here if you file it? Thanks, /be Allen Wirfs-Brock wrote: Thanks, Please file a bug on this at bug.ecmascript.org AllenOn Jan 30, 2015 8:41 PM, Leon Arnott wrote: Lately I

Re: The enumerate trap and Object.create()

2015-01-30 Thread Allen Wirfs-Brock
Thanks, Please file a bug on this at bug.ecmascript.org AllenOn Jan 30, 2015 8:41 PM, Leon Arnott wrote: > > Lately I've been puzzled about what the Proxy "enumerate" trap is supposed to > accomplish w/r/t enumeration over prototype properties. Consider the > following: > ``` >   let obj = {"

The enumerate trap and Object.create()

2015-01-30 Thread Leon Arnott
Lately I've been puzzled about what the Proxy "enumerate" trap is supposed to accomplish w/r/t enumeration over prototype properties. Consider the following: ``` let obj = {"actual-property":1}; let proxy = new Proxy(obj, {*enumerate(){ yield "falsified-property"; }}); ``` The implicatio