Friends are amazing. They’re a good thing in code too. But it’s easy to get too much of a good
At first blush, it might seem like an iterator can solve the same problem that the Visitor Pattern solves. But
The visitor pattern works best with mature, stable object structures. But since those rarely exist, let’s look at making the
The answer to that question can get a little intense. Well, no, not really, but it definitely makes for some
It’s easy to add new operations with the Visitor Pattern. How easy? Can I add 2 in a single, compendious
Object structures tend to mimic life. Which is to say, that they’re a complete mess. But thanks to the Visitor