visitor-double-dispatch-mechanism

Status: IN

The Visitor pattern achieves operation extensibility through a double-dispatch protocol: the element's Accept method receives a Visitor argument and calls back the type-specific Visit method, bridging two parallel class hierarchies (elements and visitors) without runtime type checks.

Justifications

Accept-as-argument + callback-encodes-type + two-hierarchy-structure together constitute the double-dispatch mechanism

Depends on (SL): gof-visitor-double-dispatch-via-accept, visitor-passed-as-argument-to-accept, gof-visitor-two-class-hierarchies

Depended on by

JSON