Breaking Dependencies - The Visitor Design Pattern in Cpp - Klaus Iglberger - CppCon 2022
---
Breaking Dependencies - The Visitor Design Pattern in C - Klaus Iglberger - CppCon 2022
The extensibility of code with new functionality is essential for long-term maintenance of a code base. However, when using dynamic polymorphism there is always a choice: either easily add types, or easily add operations. For instance, by means of inheritance hierarchies it’s easy to add new types, but it’s difficult to add new operations.
But there is a common workaround to overcome this weakness: the Visitor design pattern.
In this talk, I’ll explain the design properties of Visitor, including its benefits and shortcomings. I’ll also talk about different kinds of visitors (cyclic and acyclic) and show when to reach for a Visitor and when to avoid it. Additionally, I’ll demonstrate the different implementation strategies (classic and modern) and address their individual benefits and problems.
---
Klaus Iglberger
1 view
321
106
1 day ago 03:31:04 1
“Ambient Buddhism III” Full Album by TAKEO SUZUKI | Japanese Ambient Music
1 day ago 04:08:21 1
GIVE TO RECEIVE- Urmah song | 432Hz #healingmusic #meditationmusic #givetoreceive #urmah