~/talk

Deconstructing Inheritance

Talkat Meeting C++ 2021 · 2021-11-10..11-12· [rust]
links:none on file
slides:none on file

Argues that inheritance as commonly used in C++ fails specific tests: the rectangle vs square example shows broken interfaces and wasted storage, elevator/button and flying/duck examples expose hidden client coupling, and the Liskov substitution principle is shown impractical in a strict or relaxed sense. Proposes concrete alternatives — composition, narrow interfaces, and type erasure — and demonstrates when inheritance actually increases complexity versus when composition over inheritance or pure interfaces produce simpler, safer designs.

AI-written summary · about

  1. 0:00Intro
  2. 1:22deconstruction
  3. 1:43inheritance in C++
  4. 3:25problem statement
  5. 3:42two solutions
  6. 9:39problem: elevator system
  7. 11:07what is real-world?
  8. 11:38what is a Button?
  9. 14:17IS-A in software
  10. 16:07public inheritance is substitutability
  11. 17:43Liskov Substitution Principle
  12. 19:41LSP, strict sense
  13. 24:05LSP can break
  14. 27:36NOT an abstraction
  15. 28:40real-life analogy
  16. 29:14friendship impact
  17. 30:12inheritance impact
  18. 31:08example
  19. 33:28change inertia
  20. 36:43prefer composition to inheritance
  21. 38:23why use inheritance?
  22. 43:01interface guidelines
  23. 51:09source of problems
~/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.