Upcoming talk on ES6 in Russia

Jorge Chamorro jorge at jorgechamorro.com
Sat Mar 23 20:06:23 PDT 2013

On 23/03/2013, at 19:41, Axel Rauschmayer wrote:
> Arrow functions are a good example: A more JavaScript-y syntax would have been `fn`:
>     let squares = [1,2,3].map(fn(x) { return x*x });
> Or:
>     let squares = [1,2,3].map(fn(x) x*x);
> However, due to backward compatibility that syntax wasn’t possible.

I don't think that's true: old code (that doesn't use the new syntax) would continue to run, and new code that opts-in to es6 (using the new syntax) would reject the (very rare) old uses of ƒ as in function ƒ(){} or var ƒ; or ƒ=xxx;, and would allow the new forms, e.g. .map(ƒ(n) ...).

It's ~ the same case as `with` and if they really wanted it could be done, I don't buy the "it wasn't possible", no.

But as bluntly as @rwaldron put it the other day: "arrows are here to stay" (full stop)... well, ok! but I for one don't like them as much.

More information about the es-discuss mailing list