Monadic Operations for Box-Like Types - Designing the Extensibility Model
summary
Proposes free-function monadic operations so std::optional, std::expected, Boost.Optional, raw pointers and C APIs like libcurl can all join one pipeline without waiting for committee changes. Implements a beman.monadics library using SFINAE/metaprogramming, box_traits opt‑in specializations, C++20 concepts and optional C++26 reflection for diagnostics; shows concrete adapters for pointers, shared/unique_ptr, curl easy handles and conversion helpers (flatten, value_or, inspect) with compile‑time checks and tests.
AI-written summary · about
chapters (31)
- 0:00Welcome
- 0:25Motivation
- 1:30Box-like types
- 2:12C++23 limits
- 3:44Monadic pipeline
- 5:09Generic problem
- 8:22Extension model
- 10:30Existing analysis
- 13:17Then, transform, or else
- 18:37Patterns summary
- 22:35Generic design
- 27:10Or else implementation
- 30:39Extension points
- 31:43Box traits interface
- 32:05Traits for expected/optional
- 38:14Error channel detection
- 38:57Get box traits utils
- 43:36Then implementation
- 45:27Compiler diagnostics
- 51:38Diagnostic messages
- 52:00C++26 delete reason
- 57:41Testing with Boost/Std
- 58:23Traits for status/pointers
- 1:00:10Monadic pointers
- 1:04:45Monadic C APIs
- 1:08:37Extending with value_or
- 1:11:32Implementing inspect
- 1:13:20Flattening nested types
- 1:15:06Box type conversion
- 1:17:57Summary and future
- 1:19:24Q&A
related talks
01h 03mMonads in Modern C++
01h 18mSafe and Readable C++ Code: Monadic Operations in C++23
01h 10mSafe and Readable Code - Monadic Operations in C++23
57mAnd Then() Some(T) Functional Adventures With C++23 std::optional and std::expected
01h 47mFunctional C++
01h 03mHigher order functions for ordinary C++ developers
01h 31mFunctional Programming in Modern C++: The Imperatives Must Go!
17mUnboxed types for OCaml
