recursive arrow functions

Brendan Eich brendan at mozilla.org
Sun Apr 1 07:59:07 PDT 2012


Kevin Smith wrote:
> This is the workaround, right?
>
>     const recurse = () => {
>         // call recurse(), somehow...
>     };

Yes, with the hassle of hoisting from an expression out to enclosing 
block or body scope, and of polluting that scope with the name 
(long-form named function expressions avoid this).

> If so, then it seems hardly worth any added parsing complexity to 
> support named arrows.
Could be.

/be


More information about the es-discuss mailing list