Earlier quoted context omitted.
std::optional is a poor shadow of Option. It's what happens when C++ programmers who've seen a Maybe type in a window (years ago by the way, this isn't inspired by Rust, it was just stuck in the standardization process until C++ 17) but are starved of proper types and basic features like pattern matching try to imitate what they saw. As a result for example std::optional doesn't exist, because to a C++ programmer it…
std optional is based on boost optional which was written in 2003 before any sort of lambdas made monadic operations usable. The main concern with that component was ensuring we can allocate stack storage for an object that may or may not be initialized. The reference is easily achievable by using T* so is of minimal value, but also poses some more semantic problems since a reference is not copyable while an optional…
For me the important use case is pattern matching, which C++ doesn't yet have. Pattern matching really changes how you see the entire language.