arrow function syntax simplified

Kevin Smith khs4473 at
Sun Apr 8 08:52:50 PDT 2012

> Any legacy utility (3rd party or otherwise) that assumes its function
> arguments are dynamically bound (a reasonable assumption as of ES 5.1) will
> be in trouble when passed hard-bound fat arrow functions. Here's a gist
> illustrating a simplified version of a functional mixin process and how it
> would break under the current fat arrow proposal.
I don't see anything that is broken by arrow functions.  You are attempting
to use arrows for defining methods which is incorrect.  This would be

    function withCircleUtils() {
          area() { return this.radius * this.raduis * Math.PI; },
          diameter() { return this.radius + this.radius; }

Do you see a problem with this construction?

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

More information about the es-discuss mailing list