Accept No Visitors
summary
Visitor Design Pattern is framed as a workaround that forces invasive accept methods, lots of boilerplate, control inversion and poor class extensibility; the alternative proposed is a Match statement implemented as a library (patterns are first class, non‑intrusive, bindings respect member access) that produces local, nested and relational case analysis and often outperforms visitors, while open multimethods give the fastest multiple‑dispatch tables and retroactive virtuals but introduce ambiguity and linker/loader changes.
AI-written summary · about
chapters (10)
- 0:00Start
- 9:55Traditional Object-Oriented
- 33:05The Pattern Matching
- 36:54What the Library Brings
- 45:52Pattern Matching on Two Arguments
- 52:18Open Multi Methods
- 54:39Experimental Syntax
- 58:49Performance Numbers
- 1:01:38Conclusion
- 1:02:59Dynamic Linking
related talks
01h 01mC++ Design Patterns - The Most Common Misconceptions (2 of N)
48mBack to Basics: Cpp Value Semantics
49mA Journey Into Non-Virtual Polymorphism in C++
59mstd variant and the power of pattern matching
01h 37mExtending and Simplifying C++: Thoughts on Pattern Matching using `is` and `as`
01h 18mMeta Polymorphism
01h 05mWhat Classes We Design and How
01h 01mApplicative: The Forgotten C++ Functional Pattern
