Visitor combination and traversal control

  • Authors:
  • Joost Visser

  • Affiliations:
  • CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands

  • Venue:
  • OOPSLA '01 Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Visitor design pattern allows the encapsulation of polymorphic behavior outside the class hierarchy on which it operates. A common application of Visitor is the encapsulation of tree traversals. A clean separation can be made between the generic parts of the combinator set and the parts that are specific to a particular class hierarchy. The generic parts form a reusable framework. The generic parts form a reusable framework. The specific parts can be generated from a (tree) grammar. Due to this separation, programming with visitor combinators becomes a form of generic programming with significant reuse of (visitor) code.