Re:For the Love of Pipes
by ticklemyelmo on Tuesday January 22, 2019 @04:01PM
(#18972414)
C# extension methods provide the same syntax, and it is used for all of its LINQ pipeline methods. It's amazing how effective syntactic sugar can be for readability.
Nim has an interesting synthesis where a.f(b) is only another way to spell f(a, b), which (I think) matches the usual behavior of |> while still allowing familiar-looking method-style syntax. These are equivalent:
The difference is purely cosmetic, but readability matters. It's easier to read from left to right than to have to jump around.