Agreed. But as far as I can see, such common code should always be able to take
its private name with it.
For example:
let mixin = do {
let privateName = name.create();
({
[privateName](...) { ... },
publicMethod(...) { ... this[privateName](...) ... },
});
};
Even if defined outside, within a module, the private name should always be
within reach.
On Apr 5, 2012, at 18:31 , Kevin Smith wrote:
> Aren’t you possibly overthinking the problem? Generic methods should normally
> only access public methods. Should you ever have different needs, you would
> need to come up with a more elaborate solution such as clients having to
> import both the generic method and the private name it uses.
>
> But refactoring out common code within a class should be dead-simple and
> should not have any affect on the functionality of the public methods.
>
> kevin
--
Dr. Axel Rauschmayer
[email protected]
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss