4 ms·
To be fair, languages which require explicit unwrapping also provide syntactic short-hands for the most common idioms. Long-handed if/else (or pattern matching
by brandmeyer 5y ago
To be fair, languages which require explicit unwrapping also provide syntactic short-hands for the most common idioms. Long-handed if/else (or pattern matching) is used to implement the short-hands or as a last resort.
See also value_or and the C++20 monadic methods on std::optional.
http://open-std.org/JTC1/SC22/WG21/docs/papers/2021/p0798r6.html http://open-std.org/JTC1/SC22/WG21/docs/papers/2021/p0798r6....