A paper written by Martin E. Nordberg III of Quintessoft Engineering on July 22, 1996. The paper can be downloaded in PostScript format from (as of 20050913):
http://www.ccs.neu.edu/research/demeter/adaptive-patterns/visitor-usage/papers/plop96/variations-visitor-nordberg.ps
From the abstract: Two variations on the VisitorPattern are presented.
- A DefaultVisitorPattern provides default handlers for cases where the polymorphism of the hierarchy of elements can reduce the cost of code maintenance.
- An ExtrinsicVisitorPattern? implements double dispatch with run time type information instead of Accept( ) methods. With the same machinery it is possible to test the feasibility of a particular visit before performing its operation. The extrinsic visitor pattern provides several benefits in ease of software development in trade for poorer run time performance.
Interesting design tradeoffs between efficiency and maintainability determine the choice of the standard, default, or extrinsic visitor pattern in an application.
See also: VisitorPattern, AcyclicVisitor
CategoryPattern