Private Slots

Russell Leggett 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.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130115/565729cf/attachment.html>


More information about the es-discuss mailing list