Understand the real extensibility trade-off in Java Visitor: new operations are easy, new element types are expensive.
Visitor improves one kind of extensibility and weakens another.
Adding a new operation is often easy:
Adding a new element type is often expensive:
Choose Visitor only when operation growth is the dominant force and element-type churn is relatively low.