> 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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to