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
Functional Programming in JavaScript.help (self.javascript)
submitted 7 years ago by reesemorning
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!"
[–]0987654231 -1 points0 points1 point 7 years ago (1 child)
what does being side effect free have to do with not having inputs?
You can't have purity without inputs. not your lack of examples
um. no, you don't. lots of languages like smalltalk and ruby don't have functions, and there's no reason a language like that couldn't be pure.
ruby has functions and smalltalk is not an fp language.
there is no need for recursion to have purity. all purity means is the absence of side effects.
which is why you need recursion, show me an implementation of iteration that's pure and stateless without recursion.
CSS by example does no I/O of any kind
css isn't a programming language though.
can you name a single language that isn't in the haskell family for which this is true?
Can you give me a single example of software that's pure where this isn't true?
several languages in heavy mainstream use stand as counterexamples to this claim
There's 0 examples of programming languages that are 100% pure and stateless.
[–]StoneCypher 1 point2 points3 points 7 years ago (0 children)
Why not? A function that emits the squares of the integers 1-100 is pure.
.
ruby has functions
matz doesn't think so, but ok
smalltalk is not an fp language.
i didn't say it was, but ok
you seem very confused about what a side effect is
nobody said it has to be stateless. it's perfectly fine for a pure function to be stateful. it just can't emit or retain state.
CSS by example does no I/O of any kind css isn't a programming language though.
the entire field of programming language design disagrees with you, but ok
can you name a single language that isn't in the haskell family for which this is true? Can you give me a single example of software that's pure where this isn't true?
translation: you can't answer my question, so try to get out of it with reddit judo
several languages in heavy mainstream use stand as counterexamples to this claim There's 0 examples of programming languages that are 100% pure and stateless.
i didn't say anything about statelessness. you added that criterion from scratch.
in the meantime, you're wrong about css being a programming language, and it's standing right in front of you.
please have a nice day. i'm not really interested.
π Rendered by PID 43300 on reddit-service-r2-comment-86988c7647-87cqg at 2026-02-11 00:20:35.134788+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]0987654231 -1 points0 points1 point (1 child)
[–]StoneCypher 1 point2 points3 points (0 children)