~/talk

Function Contracts in Practice using C++

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp, software-architecture]
links:none on file
slides:none on file

Argues that choosing narrow function contracts and checking them (even with C assert) reduces defects, keeps APIs small, and preserves performance; describes a configurable contract-checking system with a replaceable violation handler, two assertion levels (regular vs audit), and a review → assert lifecycle to roll checks into production safely. Shows unit-testing strategy using a throwing handler instead of death tests, gives real examples (optional reference operator, cache watermarks), and ties implementation to Bloomberg practice and ongoing C++ standard work.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26Real-world contract analogy
  3. 3:31Why contracts matter
  4. 7:20Feasibility of wide contracts
  5. 11:14Reliability risks of invalid inputs
  6. 13:21Maintainability benefits
  7. 16:11Designing good contracts
  8. 17:37Minimal versus complete contracts
  9. 22:34Handling violations
  10. 25:03Contract checks and UB
  11. 27:32Side effects in checks
  12. 30:47Misusing checks for control flow
  13. 32:13Checks vs input validation
  14. 32:55Checks and unit testing
  15. 33:59Summary of contract design
  16. 35:02Documenting contracts
  17. 37:54Documentation style comparison
  18. 45:40Scaling contract checks
  19. 50:36Custom violation handlers
  20. 57:00Performance vs checks
  21. 1:00:14Adding checks to code
  22. 1:01:38Gradual enforcement review
  23. 1:05:52Testing contract checks
  24. 1:08:19Challenges with asserts
  25. 1:11:11Avoiding noexcept in narrow contracts
  26. 1:14:43Summary and recommendations
  27. 1:15:24Q&A
~/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.