russell.leggett at gmail.com
Tue Jan 15 07:55:06 PST 2013
> I have suggested before that it would be good to put control
> over object iteration into the hands of the object authors, by
> enabling them to override the slot iteration method.
> One would need to find a way of doing so without exposing private names,
> but it should allow object authors to handle your a-c, as well as define
> what cloning/mixing should do in
> the presence of private state (however encoded, although
> private slots might make this easier/more explicit).
I might be missing something, but isn't this basically covered with the
enumerable flag? And that brings us back around - if we only had unique
symbols and we defined the property using the symbol, and made it
enumerable false, would it still be private? Am I missing something obvious
(I probably am)? I know this is more work, but it would be more orthogonal.
Sugar could be added to class to make this better.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss