The tidyverse folks in R have been using that for a while: https://magrittr.tidyverse.org/reference/pipe.html
Pipelining might be my favorite programming language feature
21–30 of 360 posts
Re: Pipelining might be my favorite programming language feature
#22Building pipelines:
https://effect.website/docs/getting-started/building-pipelin...
Using generators:
https://effect.website/docs/getting-started/using-generators...
Having both options is great (at the beginning effect had only pipe-based pipelines), after years of writing effect I'm convinced that most of the time you'd rather write and read imperative code than pipelines which definitely have their place in code bases.
In fact most of the community, at large, converged at using imperative-style generators over pipelines and having onboarded many devs and having seen many long-time pipeliners converging to classical imperative control flow seems to confirm both debugging and maintenance seem easier.
Re: Pipelining might be my favorite programming language feature
#23The tidyverse folks in R have been using that for a while: https://magrittr.tidyverse.org/reference/pipe.html
Re: Pipelining might be my favorite programming language feature
#24However.
I would be lying if I didn't secretly wish that all languages adopted the `|>` syntax from Elixir.
```
params
|> Map.get("user")
|> create_user()
|> notify_admin()
```
Re: Pipelining might be my favorite programming language feature
#25data.iter() .filter(|w| w.alive) .map(|w| w.id) .collect() collect(map(filter(iter(data), |w| w.alive), |w| w.id)) The second approach is open for extension - it allows you to write new functions on old datatypes. > Quick challenge for the curious Rustacean, can you explain why we cannot rewrite the above code like this, even if we import all of the symbols? Probably for lack of > weird operators like , , $, or >>=
Re: Pipelining might be my favorite programming language feature
#26Re: Pipelining might be my favorite programming language feature
#27While the author claims "semantics beat syntax every day of the week," the entire article focuses on syntax preferences rather than semantic differences. Pipelining can become hard to debug when chains get very long. The author doesn't address how hard it can be to identify which step in a long chain caused an error. They do make fun of Python, however. But don't say much about why they don't like it other than showi…
Just before that statement, he says that it is an article/hot take about syntax. He acknowledges your point.
So I think when he says "semantics beat syntax every day of the week", that's him acknowledging that while he prefers certain syntax, it may not be the best for a given situation.
Re: Pipelining might be my favorite programming language feature
#28Re: Pipelining might be my favorite programming language feature
#29Re: Pipelining might be my favorite programming language feature
#30Is this pipelining or the builder pattern?