Monadic Operations in Modern C++: A Practical Approach
Talkat CppCon 2024 · on Thursday, 2024-09-19· at 16:45· Adams A, 6700 North Gaylord Rockies Boulevard·
summary
C++23 std::optional and std::expected plus ranges and a year of real use in a commercial internal library drive concrete advice: UI subsystem for the reMarkable ink tablet uses these for error handling and interface unification, with about 30 third‑party packages and occasional TL expected when toolchains lag. Examples show bottom‑up refactoring, splitting pure and impure code boundaries for Qt QML integration, using bind_back/front, transform_error, fewer large lambdas, and measurable performance tradeoffs — the approach works in production.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:29Agenda and framework context
- 2:24Project UI subsystem
- 4:20Technologies and Qt context
- 6:07Introduction to std::optional
- 8:56Introduction to std::expected
- 11:41Procedural error handling
- 14:35Monadic operations
- 17:50Advanced monadic operations
- 21:17Team adoption strategy
- 25:05Design for functional integration
- 29:39Qt integration example
- 31:44Gradual refactoring techniques
- 35:19Tips for reducing complexity
- 40:18Using bind_back and bind_front
- 46:07Final practical tips
- 50:09Q&A and conclusion
related talks
01h 05mMonads in Modern C++
53mC++ Horizons
01h 18mC++ and Linear Algebra
50mElevating Precision in C++ - A Journey Below the Surface of Floating-Point
58mMonads in Chains
45mRailway Oriented Programming - A Functional Approach to Error Handling
47mC++11 Library Components to Make a Scientist Happy
01h 04mSymbolic Calculus for High-performance Computing From Scratch Using C++23
