Design Pattern Note
24 Jun 2021
[
design
]
Design patterns
- Are about dependencies and abstractions
- Are about intent
- Are not limited to OO programming
- Are not limited to dynamic polymorphism
- Are not outdated nor obsolete
- Are everywhere
C++ STL examples
Strategy
Command
Iterator
Adapter
Decorator
Template Method
Proxy
External Polymorphism
Bridge
Prototype
virtual std::unique<Concept> clone() const = 0
Type erasure
- Templated constructor
- Completely non-virtual interface
- External Polymorphism + Bridge + Prototype
Reference