Visitor
In plain terms
A pattern adding operations to objects without changing their classes.
Going deeper
The Visitor pattern lets you define new operations over a set of objects by putting the logic in a visitor, keeping the objects' classes unchanged. New behavior, same structures.
Under the hood
Great when object structures are stable but operations change often; double dispatch routes calls.
Examples
AST traversal, compilers, applying operations to object trees, reporting.
Think of it like...
Like a tax inspector who visits different businesses, applying the right rules to each type.