Arrow binding

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Apr 24 16:06:47 PDT 2012


On Apr 24, 2012, at 3:53 PM, Axel Rauschmayer wrote:

> Using a builtin function (as opposed to an operator) would be less problematic if one could invoke it infix, e.g.:
> 
>      this (extend) { x: x, y: y }

That wouldn't address the issues concerning cloning private names, super binding, etc.   I believe Dave's main issue is with the exact .{ syntax.  I'm flexible if that can be be harmoniously resolved with a minor syntactic change such as:

this.={methodA() {},
            methodB() {}
        };
 or 

this.+{methodA() {},
            methodB() {}
        };

or something else

this.&{methodA() {},
            methodB() {}
        };

Allen



More information about the es-discuss mailing list