I am reading about visitor pattern, and it appears the same like Double Dispatch. Is there any difference between the two. Do the two terms means the same thing.
re
Visitor pattern is one solution which implements the behaviour of double dispatch. There can be several other solutions as well. The term double dispatch itself doesn't give any idea of solution, in fact it is a problem whose solution is provided by visitor pattern.
In C# (4.0), one could use dynamic keyword to implement double dispatch, in which case visitor pattern is not required. Here is my solution to double-dispatch problem using dynamic keyword: