Re:Verb-Noun vs. Noun-Verb
by Twisol on Wednesday October 16, 2019 @04:11PM
(#21274949)
Agreed. Some functional languages (like F#) have a pipelining operator |> that gives the same syntactic impression:
[ Parent
| on HN ]
I have found myself using pipes many times in Elm, because they make the code so much more readable. Now I understand why!
I haven't seen an autocomplete that works on pipes. But with a good type system, it is technically possible to list all compatible functions that take "noun" as first parameter.
Sometimes you supply partially applied functions (also with pipes in noun->verb order) and that's not so easy to match:
noun |> verb1 |> (otherNoun >> verb2) |> etc
But perhaps even functions that take "noun" as nth parameter could be suggested.
And other languages, such as Forth; don't need one.
list map filter odd sumHuh. I would've expected it to be `odd filter`, not `filter odd`.
Interestingly enough, the now standard data manipulation package in R, dplyr, uses pipelines.