Pipe Operator Discussions

Comments discuss the pipe or pipeline operator (|) for function chaining and composition, its presence in languages like F#, Elixir, and OCaml, and proposals or desires for it in JavaScript, Python, and others compared to alternatives like method chaining.

➡️ Stable 0.6x Programming Languages
2,427
Comments
19
Years Active
5
Top Authors
#189
Topic ID

Activity Over Time

2008
6
2009
3
2010
28
2011
32
2012
22
2013
42
2014
110
2015
107
2016
94
2017
117
2018
152
2019
162
2020
195
2021
236
2022
238
2023
382
2024
142
2025
356
2026
3

Keywords

e.g PHP REPL IMHO JS dlang.org TheNavigateur DataFrame.pipe PurefunctionPipelineDataflow df.pipe pipe operator function languages pipeline syntax elixir item functional proposal

Sample Comments

smabie • Mar 12, 2020 • View on HN

There's the pipe operator in a lot of languages (|>) to try and solve this problem, but it has always felt clunky to me. Compare:f(g(h(x)))x.h.g.fx |> f |> g |> hI think most people prefer the second one to all the rest.

rehemiau • Jun 16, 2018 • View on HN

Pipeline operator ( |> ) in functional programming languages (Elixir, F#, Elm)

jmisavage • Sep 27, 2023 • View on HN

There is a proposal to add the pipeline operator |> to the standard that works similar to what you have here.https://github.com/tc39/proposal-pipeline-operator

CyberDildonics • Jan 20, 2023 • View on HN

If you're compiling to javascript anyway, why would you need a pipe operator in javascript instead of just nesting the function calls?

scottmf • Apr 4, 2018 • View on HN

Looks like there’s a recent proposal for them:https://github.com/TheNavigateur/proposal-pipeline-operator-...

bobwaycott • Oct 7, 2016 • View on HN

Isn't that what the pipe operator is for?

hawk_ • Aug 18, 2025 • View on HN

I miss the F# pipe operator (https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...) in other languages. It's so natural to think of function transform pipelines. In other languages you have to keep going to the left and prepend function names, and to the right to add additional args, parens etc ..

scns • Nov 4, 2020 • View on HN

If you would call it pipe operator, like it's called in many (Elm, Elixir, F#, OCaml) other languages that have it, people would understand you faster IMHO. It is even discussed for inclusion into JavaScript.

shermantanktop • Apr 1, 2025 • View on HN

Thanks for that link! Now I want pipe operators...

0_gravitas • Jul 23, 2019 • View on HN

Elixir has the pipe notation, which is somewhat similar