The Visitor design pattern allows for the separation of an algorithm from the object structure, enabling the addition of new algorithms without changing the object structure. It promotes open/closed principle, single responsibility, and extension of a class. However, updating all Visitors is necessary when a class is added or removed from the hierarchy.
•3m read time• From proandroiddev.com
1 Comment
Sort: