Hey, I have just reduced the price for all products. Let's prepare our programming skills for the post-COVID era. Check it out »
Visitor

Visitor in Swift

Visitor is a behavioral design pattern that allows adding new behaviors to existing class hierarchy without altering any existing code.

Read why Visitors can’t be simply replaced with method overloading in our article Visitor and Double Dispatch.

Usage of the pattern in Swift

Complexity:

Popularity:

Usage examples: Visitor isn’t a very common pattern because of its complexity and narrow applicability.

Visitor in Other Languages

Design Patterns: Visitor in Java Design Patterns: Visitor in C# Design Patterns: Visitor in C++ Design Patterns: Visitor in PHP Design Patterns: Visitor in Python Design Patterns: Visitor in Ruby Design Patterns: Visitor in TypeScript Design Patterns: Visitor in Go