About 77,500 results
Open links in new tab
  1. When should I use the Visitor Design Pattern? - Stack Overflow

    The Visitor Pattern (like many design patterns) was born from the pain and suffering of developers who knew there was a better way to allow their code to change without requiring a lot of …

  2. java - Visitor pattern's purpose with examples - Stack Overflow

    Apr 9, 2010 · I'm really confused about the visitor pattern and its uses. I can't really seem to visualize the benefits of using this pattern or its purpose. If someone could explain with …

  3. c++ - Visitor Pattern Explanation - Stack Overflow

    My understanding of visitor pattern is as follows: In template meta-programming (STL/BOOST) (compile time binding) you can achieve (the orthogonal design) the separations of operations …

  4. What is the difference between Strategy pattern and Visitor Pattern?

    A Visitor pattern lives at a different level. It details a mechanism with which objects can accept a reference to another object (the visitor) which exposes a predetermined interface that the …

  5. When should you really use the visitor pattern - Stack Overflow

    Nov 1, 2015 · In the post When should I use the Visitor Design Pattern? the first answerer states : Now we want to add a new operation to the hierarchy, namely we want each animal to make …

  6. Difference between decorator design pattern and visitor design …

    Visitor design pattern is a way of separating an algorithm from an object structure on which it operates. A practical result of this separation is the ability to add new operations to existing …

  7. What are the actual advantages of the visitor pattern? What are …

    Applying the visitor design pattern in the above way will provide double dispatch. This way you do not necessarily need additional Visit methods when adding additional types to your hierarchy. …

  8. Confused about the Visitor Design Pattern - Stack Overflow

    Jun 3, 2021 · The code in the OP resembles a well-known variation of the Visitor design pattern known as an Internal Visitor (see e.g. Extensibility for the Masses. Practical Extensibility with …

  9. What is the point of accept () method in Visitor pattern?

    The visitor pattern's visit / accept constructs are a necessary evil due to C-like languages' (C#, Java, etc.) semantics. The goal of the visitor pattern is to use double-dispatch to route your …

  10. oop - Alternative to the visitor pattern? - Stack Overflow

    I am looking for an alternative to the visitor pattern. Let me just focus on a couple of pertinent aspects of the pattern, while skipping over unimportant details. I'll use a Shape example (sorry!)...