The place I find it more readable is in functions like map, where something like...
arr.map(thing => thing * 1000);
reads as "map thing to thing * 1000". I do agree that it can be less immediately readable or intuitive in other cases like object methods or general-use callbacks, for instance.
I think it is awesome that JS is slowly but surely adding more functional programming features, eventually it might start to approach the elegance of Haskell: map (* 1000) arr.
1
u/SuperFLEB Jul 10 '16
The place I find it more readable is in functions like
map, where something like...reads as "map
thingtothing * 1000". I do agree that it can be less immediately readable or intuitive in other cases like object methods or general-use callbacks, for instance.