On Tue, Dec 3, 2013 at 4:24 PM, Brian Di Palma <[email protected]> wrote:
> This is sort of OT but not too much. > > I have a concern about how mixins will be implemented in ES. > It concerns clashing property identifiers in mixins and the classes > taking their behavior. > > By way of a simple example an Emitter could have a local property > "this.listeners" for its own internal purposes. > Likewise a class that mixes in Emitter could also have a local > property "this.listeners". > > I was wondering if the delayed Object.mixin implementation included > some sort of sandboxing to deal with this case or if it was left to > the discretion of the developer? > > I guess the obvious suggestion is to use Symbols in Emitters, does > this mean sandboxing will not be a consideration for Object.mixin? > > You could imagine a new version of the Emitter introducing a new > identifier that could clash and lead to tricky bugs especially if the > mixin did not define the identifier until certain conditions were > met.. > It sounds like you're looking for Symbols.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

