~/talk

Typical C++, But Why?

Talkat NDC TechTown 2022 · 2022-08-29..09-01· [c-and-cpp]
slides:none on file

Argues that small, concrete types and C++20 features turn runtime surprises into compile-time errors: a SanitizedString wrapper makes using unsanitized input a compile error via an explicit constructor and conversion operator; replace multiple bool flags with enum class flags to prevent parameter mixups; model pointer+length as a single buffer_view/span to avoid off-by-header arithmetic; use a must_init<T> pattern (no default ctor) and the spaceship operator to force initialization and safe comparisons.

AI-written summary · about

  1. 0:00Welcome
  2. 1:33C++ type systems
  3. 4:41Argument passing in C++
  4. 5:04Wrong argument usage
  5. 9:45Sanitized string approach
  6. 12:15Loadable parameters anti-pattern
  7. 16:15Default parameters dangers
  8. 20:40Coupled parameters issue
  9. 27:24Buffer views for memory
  10. 30:34Socket server configuration
  11. 34:54Must-init template
  12. 37:24Wrong key types in maps
  13. 41:20Strong types with enum class
  14. 44:11Type creation patterns
  15. 46:20Expressive APIs in C++20
  16. 47:25Refuting code rot
  17. 48:54Further resources
  18. 50:21Closing remarks
  19. 50:43Q&A: Core Guidelines
~/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.