~/talk

Better Code: Runtime Polymorphism

Talkat NDC London 2017 · 2017-01-16..01-20· [c-and-cpp]
links:none on file
slides:none on file

Shows how to get runtime polymorphism in C++ without class inheritance by building a template-based runtime concept idiom that stores models via rvalue refs, move semantics, make_unique/make_shared, RVO and ADL-picked draw functions. Implements a drawable-any, a Document container and a History stack that uses light copy-on-write tiles (Photoshop demo) and value semantics with shared_ptr<const> to avoid races. Works with third-party types, matches inheritance performance, and trades off verbosity and tricky multi‑concept cases.

AI-written summary · about

  1. 0:00Start
  2. 2:35What Is Inheritance
  3. 4:18Guidelines
  4. 8:27Operation Semantics
  5. 11:15Copy Constructors
  6. 12:03Elements of Programming
  7. 14:01Polymorphism Is Intrusive
  8. 19:25Copy Constructor
  9. 19:37Assignment Operator
  10. 26:01Sync Arguments
  11. 28:07Move Constructor
  12. 29:51Language Defect
  13. 33:23Drawable Object
  14. 34:22Virtualize Copy
  15. 34:32Virtual Copy
  16. 40:15Photoshop History Panel
  17. 43:09History Brush
  18. 48:59Observer Function
  19. 53:58Drawbacks to this Approach
~/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.