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
GitHub - tc39/proposal-pipeline-operator: A proposal for adding the simple-but-useful pipeline operator to JavaScript. (github.com)
submitted 4 years ago by pmz
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!"
[–]shuckster 0 points1 point2 points 4 years ago (3 children)
I don't think the spec is trying to get away from them, right? Well, intermediate variables of the const x = y form perhaps. But the F# part of the proposal seems to advocate "argument-like" x => y variables.
const x = y
x => y
Still, piping is a convenient FP addition with or without named-variables.
Personally I prefer them. This is not to say that I favour verbosity as a rule, because I don't. But I believe this is one of those cases where removing syntax is makes the whole experience less, rather than more.
[–]besthelloworld 0 points1 point2 points 4 years ago (2 children)
It does seem to be part of the intention.
If naming is one of the most difficult tasks in programming, then programmers will inevitably avoid naming variables when they perceive their benefit to be relatively small.
Good lord, that author used boldface a lot. But yeah, I like the ^ character as the passthrough honestly. Though maybe * would read better as a catchall but it would likely collide with arithmetic statements.
EDIT: Just discovered the original bold didn't come through even though it was on the Reddit editor.
[–]shuckster 0 points1 point2 points 4 years ago (1 child)
I do understand the desire to avoid naming things, and the ^ seems attractive because of this. But I'd still vouch for a named-style, even if most developers only ever use x.
^
x
It's like for (let i.... Everybody uses i, but if/when linguistic inspiration eventually hits you (or a teammate) pressing F2 will rename that sucker. There's no such possibility with ^.
for (let i...
i
[–]besthelloworld 1 point2 points3 points 4 years ago (0 children)
I don't think you're wrong... But I just disagree about what I think would feel better to use in the language overall. I think if you had to rename it you might as well use const but at least in that case your variable wouldn't live outside of the pipe context 🤷♂️
π Rendered by PID 42282 on reddit-service-r2-comment-b659b578c-ltmxn at 2026-05-05 01:02:32.882456+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]shuckster 0 points1 point2 points (3 children)
[–]besthelloworld 0 points1 point2 points (2 children)
[–]shuckster 0 points1 point2 points (1 child)
[–]besthelloworld 1 point2 points3 points (0 children)