Visitor

Teach and apply the Visitor pattern to add new operations to a stable element hierarchy without modifying element classes, using double dispatch. Use when users ask about Visitor, double dispatch, adding behavior to sealed/frozen class hierarchies, separating algorithms from object structures, or combining Visitor with Composite or Iterator.

mdadul Updated

File contents

mdadul/agent-skills/tree/main/skills/design-pattern/behavioral/visitor commit 2546e87586

Frequently asked questions

npx skillmds@latest add mdadul/visitor