upvote
C++'s stdlib collection algorithms were basically all mutate-in-place instead of return-a-new-value until C++20 introduced ranges, and I still don't know anyone who actually uses those. By contrast, people actually use the `container.iter().map(...)` etc. in Rust.

C++ also lacks much of the fancy pattern matching features which are frequently associated with functional programming. Such features may not be fundamental to functional programming, but they would fall under "some functional programming features", in the sense that they're common in the languages of that ecosystem.

reply
I think the things that make Rust safer than C++ make it look more like a functional programming language than C++. The main point is that there are some influential people at Epic (SPJ has often spoken favourably about Rust) who would favour it over C++.
reply
Rust has a load of FP-style iter/map/filter stuff that you can technically do in C++ but only if you don't mind bleeding eyes.

It also borrows a lot of features from FP languages like nice tagged unions (enums), Result, everything-is-an-expression, etc.

reply