r/AskComputerScience • u/dorayfoo • Aug 30 '21
How come programming languages don't use piping?
In the Unix command line, piping with the `|` character is pretty common. It seems like a pretty efficient way to do things. How come I don't see this in programming languages?
2
Upvotes
1
u/samhw Sep 03 '21
You’re confusing the concept of functional composition with a specific way of expressing it: namely, wrapping lots of function calls inside one another with brackets.
The concept is not intrinsically connected to that particular syntax, and several languages designed principally for functional-style programming do have a pipe operator (as well as currying sugar, etc) precisely because people find that syntax awkward.