iterator as a unique *symbol* and the enumerate trap

David Bruant bruant.d at
Mon Oct 1 04:08:04 PDT 2012

s/name/symbol, obviously :-)

2012/10/1 David Bruant <bruant.d at>

> Hi,
> If I'm following properly, iterate is now a unique name that can be used
> on any object as per July 24 meeting notes [1]. It led the decision to
> remove the iterate trap on proxies [2]:
> "Removed ''iterate()'' trap as iterators can be defined on any old object
> via an ''iterate'' unique name. See discussion at [[harmony:iterators]]. A
> proxy will intercept the request for its iterator via the ''get'' trap,
> which is passed the unique ''iterator'' name as argument."
> What about making "enumerator" a unique name and remove the enumerate trap
> too?
> Proxies that want to redefine the behavior of for-in loop can just decide
> to return a different iterator than the target one.
> David
> [1]
> [2]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list