Dean Landolt <d...@deanlandolt.com> wrote: > Say you have an object for which you want to implement the Cowboy and Canvas protocols (to borrow /be's favorite example). Both implement a "draw" method, but when you try to import from both protocols you'll naturally have to rename one or both. Now say you want to override Cowboy's `draw` method on an instance? You'll end up clobbering the Canvas protocol's draw method with the obviously wrong function. Not cool. This can be easily corrected with Symbols.
I'm not sure I understand the example. What does a Cowboy's draw method do? Is it a specification of the Canvas protocol draw ? (In that case `.extend`ing the protocol seems to solve it). If you have a more concrete use case that would really help. I don't see how this is any different from other variables and general naming conflict issues when destructuring.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss