Re:Grim C++ Tales from the Crypt: The Visitor Pattern (2017)
by geezerjay on Wednesday March 06, 2019 @04:27PM
(#19322984)
That's a disingenuous comparison. Functions are used pervasively, but even the visitor pattern isn't used very often.
[ Parent
| on HN ]
Re:Grim C++ Tales from the Crypt: The Visitor Pattern (2017)
by bstamour on Thursday March 07, 2019 @09:11AM
(#19328094)
But in languages that support multiple dispatch at the language level, they're just another way of writing polymorphic functions. They're not just a niche feature. When you don't have to write all of the ceremony of the visitor pattern, it's easier to use visitors everywhere without thinking about them.