~/talk

Should I Check for Null Here?

Talkat CppNorth 2025 · 2025-07-21..07-23· [c-and-cpp, software-architecture]
slides:none on file

Argument: null checks are a symptom, not the solution; adopt C++26 Contracts so pre/postconditions are code, not stale comments. The talk shows concrete handlers (ignore, observe, quicken/force, enforce), how a single contract handler logs or terminates, and tradeoffs with standard expected and optional vs exceptions. Examples: an Adobe “panic save” system that successfully preserves docs, a reusable any_tidy_ptr that spread and caused misuse, and a move‑only image type that improves performance but invites partial state.

AI-written summary · about

  1. 0:00Introduction and it depends
  2. 1:14Null checks in real world
  3. 3:26Why check for null
  4. 7:43Robustness vs null checks
  5. 10:11Viral nature of null checks
  6. 12:37Undefined behavior risks
  7. 15:50Handling null errors
  8. 18:42Trusting program state
  9. 20:30Error handling strategies
  10. 27:11Reporting bugs to developers
  11. 31:48Default values and user experience
  12. 33:33Communicating errors to users
  13. 37:32Contracts in C++26
  14. 41:28Contract semantics and handlers
  15. 45:47Contract evaluation pitfalls
  16. 49:01Pit of success in contracts
  17. 50:17Why not both null checks and contracts
  18. 53:24Questions and wrap-up
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.