{"id":"gof-visitor-two-class-hierarchies","text":"The Visitor pattern defines two class hierarchies: one for the elements being operated on and one for the visitors that define operations on the elements; new operations are added by creating new visitor subclasses.","truth_value":"IN","source":"entries/2026/06/17/gof-oo-chunk-21.md","source_url":"","source_hash":"","justifications":[],"dependents":["visitor-double-dispatch-mechanism","visitor-dual-hierarchy-enables-structural-independence","visitor-structural-independence-safely-applicable"],"metadata":{"last_premise_reviewed":"2026-06-17T18:19:22","premise_review_result":"pass"},"created_at":"2026-06-17T17:04:08+00:00","updated_at":"2026-06-17T17:04:08+00:00","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"gof-visitor-two-class-hierarchies","truth_value":"IN","reason":"premise"}]}}