“What Could Possibly Go Wrong?: A Tale of Expectations and Exceptions”
summary
Conference session compares concrete error-handling techniques and shows which actually trade safety, speed and clarity: benchmarks claim table-based exceptions are fast on the happy path but throwing across stacks costs orders of magnitude; a C++ Foundation survey finds 52% of codebases ban exceptions. Examples use std::optional, std::expected/Boost.Outcome, map/and_then pipelines and a pipe operator to flatten composition, then propose compiler-level zero-overhead deterministic exceptions (try/throws sugar) that map to efficient expected-like returns. Slides and source are on the CppCon GitHub.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:35Categories of Errors
- 7:29Contract Based Programming
- 8:43recoverable errors
- 21:04Exceptions
- 27:16Optional
- 36:08Map
- 40:16Haskell
- 44:19Simon
- 48:48QA
related talks
44mError handling in C++: as easy as "use exceptions"?
01h 04mKEYNOTE: De-fragmenting C++: Making exceptions more affordable and usable
57mAnd Then() Some(T) Functional Adventures With C++23 std::optional and std::expected
01h 02mBack to Basics: Exception Handling and Exception Safety
45mTo Err is Human - Robust Error Handling in C++26
44mThe Dawn of a New Error
53mThe Dawn Of A New Error
01h 29mC++ Error Handling
