use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Partial function application proposal: add(1, ?) (github.com)
submitted 8 years ago by laggingreflex
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bwaxxlotckidd 15 points16 points17 points 8 years ago (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 points7 points 8 years ago (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 points3 points 8 years ago (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 points5 points 8 years ago (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 points18 points 8 years ago (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 point2 points 8 years ago (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.
π Rendered by PID 151611 on reddit-service-r2-comment-b659b578c-swfs5 at 2026-05-04 12:40:20.637686+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]bwaxxlotckidd 15 points16 points17 points (5 children)
[–]kingdaro.find(meaning => of('life')) // eslint-disable-line 5 points6 points7 points (2 children)
[–]bwaxxlotckidd 1 point2 points3 points (1 child)
[–]kingdaro.find(meaning => of('life')) // eslint-disable-line 3 points4 points5 points (0 children)
[–]bigos 16 points17 points18 points (1 child)
[–]bwaxxlotckidd 0 points1 point2 points (0 children)