DEV Community

Discussion on: ES6, the arrow function

Collapse
 
mikkpr profile image
Mikk Pristavka

I personally love arrow functions. To me, they are a bit more readable than function keywords. I also tend to use higher-order functions quite a bit, and x => y => z => { ... } is a lot easier to read than function (x) { return function (y) { return function (z) { ... } } }.
I use implicit returns only if the context is clear and the function itself is short and simple.

Collapse
 
jballanc profile image
Joshua Ballanco

Interesting. I've never thought to chain arrows to, in effect, create an auto-curried function but it has an aesthetic not entirely unlike one of the MLs.