I am the author of one of those github `Object.mixin` "wannabe shim" and
this is why I'd like to know how crucial/relevant would this toMethod be
for the implementation because it's un-shimmable for what I can tell if not
swapping a global `super` reference at runtime per each wrapped method: a
complete no-go that TypeScript itself should never adopt in my opinion.

Moreover, I believe mixins should not bring multiple inheritance but rather
enrich objects and if a mixin calls its parent, that should be the expected
parent no matter where the mixin has been used to enrich another object.

This is why I am having some difficulty imaging a scenario where toMethod
is needed and still I haven't seen a code example that would reflect some
real-world scenario/case.

I am just trying to understand and nothing else. Thanks for any
example/piece of code that shows why toMethod is needed/wanted/desired
instead of static/explicit super.method calls.



On Tue, Dec 3, 2013 at 11:07 AM, Brendan Eich <[email protected]> wrote:

> Andrea Giammarchi wrote:
>
>> Thanks Allen but you mentioned `Object.mixin` twice while this has been
>> abandoned
>>
>
> No, deferred -- but why does ES6 status matter? You seem to be impeaching
> toMethod not because it isn't useful, as Allen showed, but because
> something that would need it if self-hosted (Object.mixin) isn't
> standardized in ES6 as well. That doesn't make sense. If Object.mixin is in
> ES6, one use-case for toMethod is already "done".
>
> Anyway, Object.mixin should be done on github and win adoption. Probably
> libraries will do their own variations. They all need toMethod to cope with
> super.
>
> /be
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to