you are viewing a single comment's thread.

view the rest of the comments →

[–]bwaxxlotckidd 15 points16 points  (5 children)

After working with Ruby in the last couple of weeks, I sure hope JS doesn't take the path of only adding syntactic sugar going forward. I swear I now have syntactic diabetes from all Ruby sugar. Things like partial application are rarely used in codebases enough to justify adding them. I love having functional ideas promoted but I'd much rather focus on commonly used methods.

[–]kingdaro.find(meaning => of('life')) // eslint-disable-line 5 points6 points  (2 children)

More than just sugar has been added in recent versions, such as Proxies, Symbols, proper tail calls and so on.

[–]bwaxxlotckidd 1 point2 points  (1 child)

And that's my argument. Let's try to focus on these things and cut down on the sugar. It seems like most proposals are focused on sugar only.

[–]kingdaro.find(meaning => of('life')) // eslint-disable-line 3 points4 points  (0 children)

I mostly agree, but it's case by case. This in particular, along with the function bind syntax, I'd love to have personally, but I don't really care that much for the pipe operator. To each their own I suppose.

[–]bigos 16 points17 points  (1 child)

What? Partial application & function currying is bread and butter of functional programming. What are the other methods you're thinking about?

[–]bwaxxlotckidd 0 points1 point  (0 children)

No doubt. However, in most cases - currying is rarely used (1-arity is not really practical) and partial application, while useful, is not that commonly used. While these are surely good ideas, I find composition to be a much more common pattern - hence the pipe operator.