Design Patterns - The Most Common Misconceptions (2 of N)
summary
Compares CRTP, C++23 explicit object parameters and std::variant with concrete code patterns and a 10,000‑shape benchmark (225,000 translate ops, GCC 13.2 / Clang 18.14 on an 8‑core Intel) showing variant implementations can be faster (up to ~2x with impark::variant). Argues static interface (CRTP for opt‑in families) differs from mixin (CRTP for shared implementation) and that std::variant targets a fixed set of types with open operations while virtual functions target an open set of types with closed operations, so they are not interchangeable.
AI-written summary · about
chapters (8)
- 0:00Introduction to misconceptions
- 2:21Curiously recurring template
- 8:20Explicit object parameters
- 13:24Static interfaces vs mixins
- 19:12Concepts vs crtp
- 23:53The shape problem with oop
- 33:44Variant as a replacement
- 38:47Architecture over performance
related talks
43mDesign Patterns - The Most Common Misconceptions (1 of N)
01h 07mDesign Patterns in Modern C++
55mHow to "OO" in C++
41mC++ Abstraction Patterns for Cross Platform Development in C++ Software Engineering
40mBack to Basics: Virtual Dispatch and its Alternatives
58mOO Considered Harmful
01h 40mDesign Patterns: Examples in C++
01h 23mRethink Polymorphism in C++
