Arrow binding

Kevin Smith khs4473 at
Mon Apr 23 07:30:19 PDT 2012

> Yeah, I think you're missing the composition arguments. If I create
> mixins with methods, they're going to have a promiscuious "this" as a
> *feature*. You might not write code like this today, but you probably
> should ;-)

But anyone who understands the language would not use arrow functions for
that use case.  I assume you're referring to something like this (Angus
posted a similar example a while back):

    function mixin() {
            addMethodA() {},
            addMethodB() {}

Your idea of a "preferred" binding for methods is interesting (as a form of
method extraction), but I don't think it can be applied to arrow functions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list