~/talk

Safe and Readable C++ Code: Monadic Operations in C++23

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp, functional-programming]
links:none on file
slides:none on file

Explains how C++20/23 turns nested error-and-loop code into composable pipelines using std::views::transform and std::views::join, and how to replace ad‑hoc error flags with std::optional and std::expected for carryable diagnostics. Demonstrates a working pointer monadic wrapper cptr that unwraps and composes with optionals, shows a continuation pipeline using cute_concurrent plus a writer monad for lock‑free per‑pipeline tracing, and highlights real pitfalls (dangling refs, lazy views) and a checklist for compiler errors.

AI-written summary · about

  1. 0:00Introduction
  2. 4:01Talk goals
  3. 5:26Functors purpose
  4. 12:33Functor implementations
  5. 16:46Ranges views pitfalls
  6. 22:07Feeding functors
  7. 22:27Monads practical use
  8. 35:39Error handling with optional
  9. 43:02Basic optional operations
  10. 45:13Classic vs monadic errors
  11. 54:11Compiler errors fixes
  12. 57:52Custom monad wrapper
  13. 1:06:08Combining monads
  14. 1:14:03Key takeaways and practical advice
~/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.