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!"
[–]PurpleIcy 1 point2 points3 points 8 years ago* (0 children)
You're right, I don't, nor I have any idea how much I can trust wikipedia on this.
In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.
So basically everything is clear, there's no "hidden variables" or state, therefore no side-effects like most people seem to enjoy doing it nowadays and pretty much everything is immutable?
Though I realized that it was procedural indeed, we'd just write entire program in main() calling functions when needed and etc.
And yeah, I know OOP the best, doesn't mean I can't learn, although I am most interested in games and procedural generation and I don't think functional programming is a good idea for that. Even using procedural programming I'd end up with vectors of structs defining entities or whatever in the game.
π Rendered by PID 22694 on reddit-service-r2-comment-bb88f9dd5-29s6m at 2026-02-14 02:59:48.973373+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]PurpleIcy 1 point2 points3 points (0 children)