You give a single example from the C++ stdlib, but before that type was added I had never seen "flat map" used to mean this weird type.
Notably for example Rust's FlatMap is an implementation detail of Iterator::flat_map which is what you'd use to map each object into multiple items then flatten the result into a single stream of items in a single operation.
Do you have other examples? WG21 has a bad habit of making up their own names for ideas which have better names, or using names which mean something else already.
Whether the C++ standards names are ideal or not, you shouldn't be surprised if C++ programmers reading a C++ subreddit expect the terms to match the standard.
View all comments
Show parent comment
2
u/tialaramex Sep 08 '26
You give a single example from the C++ stdlib, but before that type was added I had never seen "flat map" used to mean this weird type.
Notably for example Rust's FlatMap is an implementation detail of
Iterator::flat_mapwhich is what you'd use to map each object into multiple items then flatten the result into a single stream of items in a single operation.Do you have other examples? WG21 has a bad habit of making up their own names for ideas which have better names, or using names which mean something else already.