I have to design a solution for a task, and I would like to use something theoretically similar to C#'s ExpressionVisitor.
For curiosity I opened the .NET sources for ExpressionVisitor to have a look ...

I am having some trouble understanding the Visitor design pattern in respect to a tree. From my understanding, the tree itself would need an accept method that would take in a parameter of the visitor ...

I'm currently implementing the visitor pattern in C# for a lecture in the university. It works fine at the moment, but I have a question for a task we had to do.
At the moment I have something like ...

I wanted to do overloaded method dispatching and Visitor pattern looked too much convoluted.
My stupid mind came up with something like below, and it works. Is it fine to follow something like this ?
...

As I understand it, in the typical specification of the Visitor pattern, it is the visited objects that decide how to traverse, and generally they only support one traversal order. (See, e.g., here ...

It seems pretty dull to me that an language like C++/Java does not allow me to have the compile time benefits of disabling the double dispatch problem of the visitor design pattern, since I could do ...

When implementing the Visitor Pattern, is it a bad idea to add additional parameters to the Accept and Visit methods? I have never seen any examples that do this but no mention of it being a bad idea ...

I'm attempting to use boost::static_visitor to implement actions on a boost::variant type that affect the state of some variable. My approach was to contain all of the state variables in my command ...

Visitor pattern (double dispatch) is a very useful pattern in its own rights, but it has often been scrutinized of breaking interfaces if any new member is added to the inheritance hierarchy, which is ...

more updates
As is explained in the selected answer, the problem is in JVM's garbage collection algorithm.
JVM uses card marking algorithm to keep track of modified references in object fields. For ...

I read quite a lot about the visitor pattern and its supposed advantages. To me however it seems they are not that much advantages when applied in practice:
"Convenient" and "elegant" seems to mean ...

Suppose I have a suite of classes that accept a visitor (visitor-pattern), but due to the nature of those classes or a particular visitor, performing working on them will likely be capable of throwing ...

I have a composite class structure with many classes involved. This structure needs to be traversed for many different reasons (validation, cloning, exporting as xml etc) so it makes sense to write ...

I recently needed to update over a hundred Concept items using a script utilizing Colectica SDK for DDI, and I need to propagate those updates throughout all locations within a set with a known root ...

My application implements the visitor pattern. I have several different visitors implementing the same interface and I am trying to decide where the best place to define the visit methods for each of ...

I want to make sure this will work before my code gets too big/complicated to post. I do not have enough to test if this works the way I expect
I'm working on something in which I'd like to use the ...

I'm studying the visitor pattern and I wonder how this pattern is related to the open/closed principle. I read on several websites that "It is one way to follow the open/closed principle." (citated ...