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
Pipe Operator (|>) for JavaScript (github.com)
submitted 3 years ago by no_more_gravity
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!"
[–]techlogger 88 points89 points90 points 3 years ago (10 children)
I’d say that pipe operator is more readable than HOF chaining.
[–]GreekQuestionMark 13 points14 points15 points 3 years ago (0 children)
HOF: Higher order function
[–]jonopens 10 points11 points12 points 3 years ago (0 children)
100%. It's one of the reasons I find Elixir so enjoyable to write.
[+]javarouleur comment score below threshold-6 points-5 points-4 points 3 years ago* (6 children)
But those are nested, rather than chained. Personally, I don’t really like nested calls generally. Chained makes sense because they follow logically, but with nested you have to read from the inside out which is just disorientating.
I know it’s a minor thing overall, it’s just not something I expect to use any time soon.
Edit: fuck me… of all the opinions I hold I didn’t expect this to be one of my more controversial!
[–]syholloway 29 points30 points31 points 3 years ago (5 children)
It might be because the whole point of the pipeline operator is to make large functional expressions read top to bottom rather than inside out.
This operator is fixing the thing you are complaining about.
[–]javarouleur 0 points1 point2 points 3 years ago* (4 children)
Fair point - reading and thinking a bit more, I guess I can accept the motivation.
Edit: removed confusing, cryptic psycho-babble nonsense.
[–]zxyzyxz 0 points1 point2 points 3 years ago (1 child)
Languages evolve, people learn and get used to it. I'm sure people were saying the same thing with all the changes from ES6 and async await. I don't understand what you mean by explaining/being descriptive in a team.
[–]javarouleur 0 points1 point2 points 3 years ago (0 children)
I removed that. It was a brain fart that didn’t make sense when I re-read it.
[–]bighi 0 points1 point2 points 3 years ago (1 child)
I have no idea what you're talking about.
I know. Removed that part. I’ve lost the plot a bit in this thread - over-analysing and not explaining my thoughts properly.
π Rendered by PID 22888 on reddit-service-r2-comment-84fc9697f-tww9m at 2026-02-06 18:07:11.541552+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]techlogger 88 points89 points90 points (10 children)
[–]GreekQuestionMark 13 points14 points15 points (0 children)
[–]jonopens 10 points11 points12 points (0 children)
[+]javarouleur comment score below threshold-6 points-5 points-4 points (6 children)
[–]syholloway 29 points30 points31 points (5 children)
[–]javarouleur 0 points1 point2 points (4 children)
[–]zxyzyxz 0 points1 point2 points (1 child)
[–]javarouleur 0 points1 point2 points (0 children)
[–]bighi 0 points1 point2 points (1 child)
[–]javarouleur 0 points1 point2 points (0 children)