~/talk

Monadic Operations in Modern C++: A Practical Approach

Talkat NDC TechTown 2024 · 2024-09-09..09-12· [software-architecture]
links:none on file
slides:none on file

Uses C++23 std::expected and std::optional plus ranges and the TL expected implementation for older toolchains to replace error-code/boolean returns in a real internal UI framework for a commercial ink tablet; chains load-and-add-window operations, transforms error types with transform_error, and recovers with bind_back/bind_front to add context. Claims: one year of production use, fewer boilerplate checks, safer error propagation, and stepwise refactor path from private impl to public monadic APIs; reports it largely works in practice.

AI-written summary · about

  1. 0:00Monadic operations in C++
  2. 1:08Expected and optional overview
  3. 6:07Practical optional use cases
  4. 10:04Expected for error handling
  5. 12:10Monadic operations examples
  6. 14:38Pitfalls in monadic error handling
  7. 15:00Monadic operations in production
  8. 19:18Monadic chain evaluation
  9. 20:04Functional C++ design
  10. 22:32Resistance to monadic patterns
  11. 24:22Mixing functional and imperative
  12. 25:46Boundaries for functional code
  13. 27:30Case study: Window layout class
  14. 31:22Refactoring to monadic interfaces
  15. 35:15Controversial monadic tips
  16. 35:56Reducing lambda complexity
  17. 39:31Bind back and bind front
  18. 41:42When to use bind back
  19. 45:15Readability vs flexibility
  20. 46:19Team consensus on monads
  21. 47:25Namespace and capture in bind
  22. 49:01Composable types return
  23. 50:48Tuples and pairs in monads
  24. 51:10Transforming error types
  25. 52:13Adding error context
  26. 53:17Third-party functional libraries
  27. 54:02Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.