Function Composition and the Pipe Operator in C++23 – With std::expected

https://www.cppstories.com/2024/pipe-operator/

10 points · 1 comments · view on lemmy.world

1 Comments

namingthingsiseasy@programming.dev · 4 pts · 1y

I found this interesting as someone who really enjoys using the |> operator that's present in a bunch of other languages. I also like how it uses "result or error"-like types to be able to report errors from the pipeline too.

Highly unlikely that I'd ever use this in code I work with personally, but an interesting and fresh take. I definitely learned a few new interesting concepts from reading this!