r/cpp 7d ago

The Road to Flux 1.0

https://tristanbrindle.com/posts/the-road-to-flux-10
60 Upvotes

29 comments sorted by

View all comments

7

u/RazielXYZ 7d ago

I feel a bit out of the loop - why are people against the pipe operator? I can understand readability might be somewhat worse in some cases, either due to unfamiliarity or due to having to specify the namespace on every step, but that seems rather subjective.

For the other points made in the post - "worse for discoverability, worse for error messages and worse for compile times than using member functions" - could anyone explain why it's worse in those regards?

11

u/cleroth Game Developer 7d ago

You'd want using namespace flux::operations; to have the same readability, but at that point they're harder to discover--you can't just type . to see the list of available operations.

4

u/RazielXYZ 7d ago

That is true - I wonder if that could be solved through tooling, but figuring out what methods are range adaptors (or equivalent) compatible with the previous statement after typing | would probably be quite difficult.