Breaking Dependencies: Type Erasure - A Design Analysis - Klaus Iglberger - CppCon 2021
Contents
- The Challenge of Software Design
- The Naive Solution: Inheritance
- The Classic Solution: Design Patterns
- The Modern Solution: Type Erasure
1. The Challenge of Software Design
[2:16] - 软件开发问题的根源:变化
[2:42] - “The truth in our industry: Software must be adaptable to frequent changes”
2. Our Toy Problem: Shapes
Klaus Iglberger在讲座中使用了形状(常用于游戏开发),作为讲解 Type Erasure 的任务示例;常见的图形有:圆形、矩形和三角形等等;
3. Type Erasure 用到的设计模式
- Bridge Pattern:桥接模式
- Prototype Pattern:原型模式
4. UML类图讲解
[42:13] - 通过UML类图的方式,展示了 Type Erasure 的整体设计;