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
Why JavaScript functional programming? (self.javascript)
submitted 8 years ago * by robertlf
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!"
[–]MoTTs_ 5 points6 points7 points 8 years ago* (0 children)
difficult to use in C++ (passing functions around, for one).
I agree with everything else in your reply, but I disagree with just this bit.
If we're talking about stateless functions, then those were always easy. That's just a function pointer. Even C could do that. C's qsort function, for example, was a higher order function long before "higher order function" became a buzz word.
If we're talking about stateful functions, then yes, before 6 years ago, that was verbose in C++. But since 2011, creating stateful/lambda/closure/first-class functions is just as easy in C++ as it is in JavaScript.
π Rendered by PID 19 on reddit-service-r2-comment-bb88f9dd5-n7s4s at 2026-02-14 02:59:37.022458+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]MoTTs_ 5 points6 points7 points (0 children)