Breaking Dependencies: type erasure - a design analysis
summary
Argues that type erasure measurably breaks artificial dependencies by replacing deep inheritance with a wrapper that has a templated constructor and a non-virtual interface and that it composes external polymorphism, the bridge and the prototype clone. Demonstrates a concrete shape type: private shape_concept/shape_model pimpl, free draw/serialize functions, vector<shape> value semantics and fewer pointers, shows copying via clone and points to storage policies for improved performance and reduced allocations.
AI-written summary · about
chapters (43)
- 0:00Introduction
- 2:41Change
- 3:25Dependencies
- 4:39The toy problem
- 5:38The shape hierarchy
- 9:05Using inheritance naively
- 10:11What do we do
- 10:26Design patterns
- 12:13Strategy design pattern
- 16:05glcolor
- 18:14draw square
- 18:56opengl strategy
- 20:12design analysis
- 25:59inheritance
- 26:23type erasure
- 26:54type ratio
- 28:34representation
- 28:59circle
- 29:45no dependency
- 31:05operations
- 31:21requirements
- 32:45draw strategy
- 33:49design pattern
- 34:48drawing
- 35:37functions
- 36:24shape concepts
- 36:35shape model
- 38:58private
- 39:38templated
- 40:43constructor
- 41:06bridge
- 42:10member functions
- 44:23prototype
- 45:56drawshape
- 46:30shapes
- 47:54the design analysis
- 49:50eric nebla
- 52:43one idea
- 53:28other talks
- 54:06can you save all the trouble
- 54:30summary
- 56:14training
- 56:31QA
related talks
01h 02mBreaking Dependencies: Type Erasure - A Design Analysis
01h 01mBreaking Dependencies - C++ Type Erasure - The Implementation Details
01h 03mType Erasure - The Implementation Details
44mPragmatic Type Erasure: Solving OOP Problems w/ Elegant Design Pattern
01h 01mPractical Type Erasure
36mThe language that isn't
01h 05mExpressing Implementation Sameness and Similarity - Polymorphism in Modern C++
01h 01mEmbracing (and also Destroying) Variant Types Safely
