Visitor Pattern Implementor

Implement the Visitor pattern to define new operations on an object structure without changing the classes of the elements it operates on. Use when you have a stable class hierarchy but frequently add new operations, when many unrelated operations need to be performed on an object structure, or when you want to accumulate state across a traversal. Includes the critical stability decision rule, double-dispatch mechanism (Accept/Visit), Iterator integration for traversal, and the encapsulation trade-off warning.

bookforge-ai Updated 42 repo stars
Sheldon the robot reading a BookForge book

File contents

bookforge-ai/bookforge-skills commit ad1add48fa

Frequently asked questions

npx get-skill add bookforge-ai/visitor-pattern-implementor