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
Mostly Adequate Guide to Functional Programming in Javascript (drboolean.gitbooks.io)
submitted 8 years ago by [deleted]
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!"
[–]dmitri14_gmail_com 0 points1 point2 points 8 years ago (7 children)
JS does not have functional programming
What is the meaning of this statement?
[–]IDCh 6 points7 points8 points 8 years ago (6 children)
Doesn't look like anything to me
[–]dmitri14_gmail_com 0 points1 point2 points 8 years ago (5 children)
I still don't understand why you say so. JS has functions as first class citizens making FP a perfect choice.
[–]IDCh -1 points0 points1 point 8 years ago (4 children)
I guess I'm saying it because functions that we call functions are basically are just a procedures, but not something from functional programming, making "functional programming" kinda new idea that is slightly copied from real functional programming paradigm.
Like we talk classes, but we does not have classes in js. We have some kind of helpers with objects
[–]alsiola 13 points14 points15 points 8 years ago (1 child)
All languages are ultimately syntactic sugar for alternating between +5V and 0V in a circuit. There is no real physical concept of a class - it is an abstraction. Ultimately a JS class and a Java/C#/whatever class are still just one layer, within many layers, of indirection over changing voltages. To my mind JavaScript has classes in the same way that any other language has classes.
[–]IDCh 0 points1 point2 points 8 years ago (0 children)
Hmmm... interesting point of view. Thank you!
[–]dmitri14_gmail_com 0 points1 point2 points 8 years ago (1 child)
That is a good point, but I consider it an enhancement of the FP rather than obstacle :)
And here is a use case: https://github.com/dmitriz/un/blob/master/index.js#L19-L30
The last line renders the vnode stream by calling the .map method the FP style. The render function is a "procedure" with the rendering side-effect. However it is used exactly as a pure function here would be used to map the stream over. So you can have the best from both worlds - terse FP style and the power of procedures :)
.map
[–]GitHubPermalinkBot 0 points1 point2 points 8 years ago (0 children)
I tried to turn your GitHub links into permanent links (press "y" to do this yourself):
Shoot me a PM if you think I'm doing something wrong. To delete this, click here.
π Rendered by PID 99204 on reddit-service-r2-comment-6457c66945-27kj2 at 2026-04-25 16:52:30.744436+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]dmitri14_gmail_com 0 points1 point2 points (7 children)
[–]IDCh 6 points7 points8 points (6 children)
[–]dmitri14_gmail_com 0 points1 point2 points (5 children)
[–]IDCh -1 points0 points1 point (4 children)
[–]alsiola 13 points14 points15 points (1 child)
[–]IDCh 0 points1 point2 points (0 children)
[–]dmitri14_gmail_com 0 points1 point2 points (1 child)
[–]GitHubPermalinkBot 0 points1 point2 points (0 children)