Explores the Visitor design pattern through a modern lens using Java 25, demonstrating how to implement a fluent visitor interface for traversing data structures. Shows how visitors provide better encapsulation than direct pattern matching, allowing radical changes to underlying representations while maintaining the same

10m read timeFrom neilmadden.blog
Post cover image
Table of contents
A simple exampleThe Basic VisitorFluent VisitorsBenefits of encapsulationA functional programming view on the humble Visitor

Sort: