News for hackers. Stuff that matters.
Re:Ask HN: Pipes in Programming Languages by drweevil on Sunday April 13, 2025 @01:58PM (#43674584)
I'm assuming that by 'pipe operator' you mean the semantics, not specifically '|'. Of the programming languages I've used F# ('|>', https://camilotk.github.io/fsharp-by-example/chapters/pipe/), Elixir ('|>', https://elixirschool.com/en/lessons/basics/pipe_operator), and Clojure ('->' and '->>', https://clojure.org/guides/threading_macros), have pipe operators. The last two implement them as macros.
Re:Ask HN: Pipes in Programming Languages by bookwormtrixie on Sunday April 13, 2025 @06:40PM (#43676379)
Aside of mentioned above languages, many others have similar concept but does not use any particular operator, e.g.: C# - LINQ https://learn.microsoft.com/en-us/dotnet/csharp/linq/ Java - Streams https://docs.oracle.com/en/java/javase/24/docs/api/java.base... Rust - Iterator trait https://doc.rust-lang.org/std/iter/trait.Iterator.html