🤖 AI Summary
Flux’s maintainer posted a design update for Flux 1.0 that moves the library closer to std::ranges style to reduce the “diff” users complain about. The biggest visible change is switching from member-function chaining to overloaded pipe operators, e.g. from
auto total = flux::ref(vec).filter(...).map(...).sum();
to
auto total = std::cref(vec) | flux::filter(...) | flux::map(...) | flux::sum();
Terminal algorithms will be usable without repeating flux::operations (like Range v3 actions), but the plan is not to support both syntaxes to avoid extra maintenance and confusion.
Technically, Flux preserves its distinguishing semantics: adaptors remain owning sinks (they continue to take ownership and will reject non-trivially-copyable lvalues), so you must be explicit when passing references (std::cref). The change prioritizes familiarity and adoption over Flux’s original member-API ergonomics; that tradeoff can make Flux easier to learn for users of std::ranges but may alienate those who preferred Flux’s more method-oriented feel and could slow pressure for UFCS/extension-methods in C++. The update also signals how Flux intends to balance API ergonomics, performance, and standardisation concerns (e.g., cursor/internal-iteration proposals) as it heads toward 1.0.
Loading comments...
login to comment
loading comments...
no comments yet