Re:Functional programming is not popular because it is weird...
by lostcolony on Monday September 13, 2021 @02:59PM
(#28515328)
Elixir, Elm, Ocaml, Haskell, and F# all have a pipe like operator for function composition (though the actual operator varies).
[ Parent
| on HN ]
Re:Functional programming is not popular because it is weird...
by chaorace on Tuesday September 14, 2021 @08:21AM
(#28523604)
There's also a Stage 2 proposal for adding a pipe operator to JS[1]
Re:Functional programming is not popular because it is weird...
by thaumasiotes on Tuesday September 14, 2021 @05:39AM
(#28522303)
Clojure has the -> macro:
https://clojuredocs.org/clojure.core/-%3E
It does the same thing, but it's much more awkward to use.
Re:Functional programming is not popular because it is weird...
by eigenhombre on Tuesday September 14, 2021 @08:09AM
(#28523468)
As a daily user of -> and ->>, I am curious what you find awkward about them.
Re:Functional programming is not popular because it is weird...
by thaumasiotes on Tuesday September 14, 2021 @01:24PM
(#28527903)
You have to plan to use them in advance. With a pipeline operator you can figure out the command you want at one stage and then tack on another part of the pipeline without needing to go back and alter the way you began the line.
Re:Functional programming is not popular because it is weird...
by madcaptenor on Monday September 13, 2021 @03:01PM
(#28515354)
R also has it, if you count R as a functional language.
Re:Functional programming is not popular because it is weird...
by 6gvONxR4sf7o on Monday September 13, 2021 @03:07PM
(#28515419)
I think libraries are just as relevant as languages, and dplyr’s pipes are wildly popular and (more to the point) even idiomatic R at this point.
Re:Functional programming is not popular because it is weird...
by madcaptenor on Monday September 13, 2021 @04:20PM
(#28516334)
Actually base R has a pipe operator now. (I still use the dplyr pipe, just out of familiarity.)
Re:Functional programming is not popular because it is weird...
by pharmakom on Tuesday September 14, 2021 @01:22AM
(#28520558)
R is a surprisingly functional language!