~/talk

The Dawn of a New Error, (C++ error-handling and exceptions)

Talkat CppCon 2019 · 2019-09-15..09-20· [compilers-and-language-design]
slides:none on file

Proposal p0709 implements zero-overhead deterministic exceptions by turning throws into a return-channel value isomorphic to std::expected plus a lightweight std::error status_code (p1028) that fits in two registers and removes the boolean/string and singleton problems. Supporting papers add a move_relocates attribute and object-relocation to let erasure be memcpyable, enabling optimizer-level discriminators and near‑no‑cost propagation. Compiler can statically check frozen functions and an optional try keyword enables interop with dynamic exceptions; boost::outcome is a usable library prototype today.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 1:58Historical context of error handling
  3. 3:46Exploding return types and early ideas
  4. 6:33Expected and Result types in languages
  5. 8:43Using std::expected for error handling
  6. 11:36Boilerplate and pain points
  7. 13:00Monadic operations for expected
  8. 14:49Exceptions vs. expected performance
  9. 15:53Static exceptions with p0709
  10. 19:46Introducing std::error
  11. 21:50System error code limitations
  12. 28:53Proposed std::status_code changes
  13. 33:54Move relocate and object relocation
  14. 37:08Summary of proposals
  15. 40:01Q&A: Pointer usage and overhead
  16. 41:50Q&A: Syntax similarity to dynamic exceptions
  17. 42:31Q&A: Zero-cost abstraction claims
  18. 43:35Q&A: Local error handling
  19. 45:02Q&A: Domain overhead and RTTI
  20. 46:28Q&A: Error type specification
  21. 48:16Q&A: Transitioning from exceptions
  22. 49:47Q&A: Optional try keyword enforcement
  23. 50:52Q&A: Recommendations for current code
  24. 52:18Q&A: Type erasure and catching
  25. 54:07Q&A: Future of exception hierarchies
  26. 55:35Q&A: Getting p0709 into C++23
  27. 56:37Q&A: Optional try keyword necessity
  28. 57:18Q&A: Breaking std::exception inheritance
~/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.