~/talk

Back to Basics: Designing Classes (part 1 of 2)

Talkat CppCon 2021 · on Monday, 2021-10-25· at 12:30· online· [frontend-architecture]
slides:none on file

Argues that class design becomes manageable by extracting actual variation points and showing concrete refactor steps: replace sprawling inheritance with the strategy design pattern, use the non-virtual interface (NVI) / template‑method to keep caller APIs stable, prefer value semantics or function objects over raw owning pointers and apply RAII with the rule of zero. Demonstrations use unique_ptrs, callable objects and templates, measure reduced duplication, shallower hierarchies, and easier extension without breaking callers.

AI-written summary · about

  1. 0:00Introduction
  2. 0:50Expectations
  3. 2:37Dependencies
  4. 5:41Naming
  5. 8:39Change and Extension
  6. 9:13Shape Hierarchy
  7. 13:15Inheritance
  8. 15:00Design Principles
  9. 26:15Design classes for easy change
  10. 27:35Design styles
  11. 29:40Template method
  12. 38:35Testability
  13. 44:33Implementation Guidelines
  14. 54:31Questions
~/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.