~/talk

Contracts, Safety, and the Art of Cat Herding

Talkat C++ on Sea 2025 · 2025-06-23..06-25· [c-and-cpp, engineering-leadership]
links:none on file
slides:none on file

C++26 adds language contract assertions with four evaluation semantics (ignore, observe, enforce, quick enforce) and the proposal P3100 catalogs 90 cases of UB across 12 categories, finding 17 where a well‑defined fallback is possible and ~79 that need runtime detection. The plan injects implicit contract assertions (compiler‑generated checks that hook the standard contract violation handler), introduces labels and profiles for grouping and opt‑in/opt‑out, and formalizes an assume semantic for compatibility; work is incremental, not a Rust‑style rewrite.

AI-written summary · about

  1. 0:00Introduction
  2. 0:52What makes a good program?
  3. 2:12Defining program correctness
  4. 4:06The messiness of specifications
  5. 5:15The contract model
  6. 7:13Documenting contracts
  7. 8:10C++26 contract assertions
  8. 10:46Contract evaluation semantics
  9. 12:07Limitations of assertions
  10. 13:26Class invariants and ranges
  11. 15:17Summary of contract assertions
  12. 17:07What assertions are not
  13. 19:40Safety and security
  14. 21:02Definitions of safety
  15. 23:16Lamport safety properties
  16. 25:26Functional safety vs UB
  17. 27:37Safety beyond UB
  18. 29:10Security in C++
  19. 30:52Correctness, safety, and security
  20. 32:34Reducing undefined behavior
  21. 34:03Memory safety challenges
  22. 35:54Compile-time memory safety
  23. 37:09The salami tactic for UB
  24. 39:26Committee efforts on UB
  25. 41:36P3100: Runtime diagnosis of UB
  26. 44:14Categorizing UB cases
  27. 46:53Fallback behaviors and opt-outs
  28. 50:54Implicit contract assertions
  29. 52:37Implementing the checks
  30. 55:17Well-defined fallback example
  31. 58:44Labels and semantic control
  32. 1:00:56The big picture
  33. 1:03:32Roadmap for legacy and new code
  34. 1:06:00The role of profiles
  35. 1:08:52Committee planning and summary
  36. 1:10:03The art of cat herding
  37. 1:14:00Working in a committee
  38. 1:15:41Rules for consensus
  39. 1:18:48Logical fallacies in design
  40. 1:21:56A decision-making algorithm
  41. 1:26:01Example of decision algorithm
  42. 1:29:25Conclusion
~/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.