~/talk

Better Code: Contracts in C++

Talkat CppCon 2023 · on Friday, 2023-10-06· at 13:30· Adams, 6700 North Gaylord Rockies Boulevard· [developer-experience]
links:none on file
links:none on file
slides:none on file

Concrete C++ mechanics and tradeoffs land quickly: a zip_vector example shows preconditions, postconditions, and class invariants and the cost of checking them; exception semantics get classified as no-throw / strong / minimal guarantees and used to decide when to restore invariants or make objects discardable; some contract checks are feasible only for testing and some invariants force weaker APIs; the workflow emphasizes reviewing contracts first and code second as the practical route to safer, maintainable C++.

AI-written summary · about

  1. 0:00Welcome
  2. 1:30Documentation vs code
  3. 4:20Origins of contracts
  4. 10:05Zip Vector example
  5. 13:43Post-condition checks
  6. 16:57API contract strength
  7. 23:22Broken invariants
  8. 24:04Exceptions via contracts
  9. 30:05Error handling in C++
  10. 36:54Theory of exceptions
  11. 37:15Zip Vector interface
  12. 40:49Code vs documentation
  13. 45:25Contracts in code review
  14. 46:30Contract checks limits
  15. 49:01Q&A: Implicit contracts
  16. 51:09Q&A: Human language vs code
  17. 52:17Q&A: Composing contracts
  18. 55:55Q&A: Abstraction layers
  19. 57:41Q&A: Debugging with contracts
  20. 1:00:31Q&A: Machine-checkable contracts
  21. 1:01:52Q&A: Documentation as contract
  22. 1:04:46Closing remarks
~/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.