Is the visitor pattern good?

There are at least three very good reasons for using the Visitor Pattern: Reduce proliferation of code which is only slightly different when data structures change. Apply the same computation to several data structures, without changing the code which implements the computation.

Leave a Reply

Your email address will not be published. Required fields are marked *