December 2018
Intermediate to advanced
414 pages
10h 19m
English
As we've seen, the visitor pattern is a powerful design pattern that helps you write algorithms that are independent from the data they consume. The object structure stays untouched, whether arrays, dictionaries, trees, or even more complex structures, and each node or aggregate is enhanced with the Visitor object's capabilities.
Swift is particularly suitable for this design pattern, as we can leverage protocols and extensions, allowing the Visitor to be defined in completely different call sites.
Read now
Unlock full access