iterator as a unique *symbol* and the enumerate trap
bruant.d at gmail.com
Mon Oct 1 04:08:04 PDT 2012
s/name/symbol, obviously :-)
2012/10/1 David Bruant <bruant.d at gmail.com>
> If I'm following properly, iterate is now a unique name that can be used
> on any object as per July 24 meeting notes . It led the decision to
> remove the iterate trap on proxies :
> "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
> Proxies that want to redefine the behavior of for-in loop can just decide
> to return a different iterator than the target one.
>  https://mail.mozilla.org/pipermail/es-discuss/2012-July/024207.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss