std::optional and the m word
summary
std::optional has two states and is claimed to behave as a monad here: it supports map (apply-if-present) and bind (compose operations that may fail) so sequences of failures stop automatically and error checks vanish from the logic. A working implementation lives at Titanllama/optional and a standards proposal is cited as P0798. The demo composes vision-style steps that may return empty optionals and shows the approach actually preserves semantics and removes boilerplate.
AI-written summary · about
related talks
01mstd::optional
05mMaking optional optional
01h 02mOption(al) is not a failure
01h 01mApplicative: The Forgotten C++ Functional Pattern
58mThe Imperatives Must Go! [Functional Programming in Modern C++]
55mMonadic Operations in C++23
59mstd variant and the power of pattern matching
46mFive Issues with std::expected and How to Fix Them
