Multiple dispatch as dispatch on Tuples

  • Authors:
  • Gary T. Leavens;Todd D. Millstein

  • Affiliations:
  • Department of Computer Science, Iowa State University, 229 Atanasoff Hall, Ames, Iowa;Department of Computer Science and Engineering, University of Washington, Box 352350, Seattle, WA

  • Venue:
  • Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many popular object-oriented programming languages, such as C++, Smalltalk-80, Java, and Eiffel, do not support multiple dispatch. Yet without multiple dispatch, programmers find it difficult to express binary methods and design patterns such as the "visitor" pattern. We describe a new, simple, and orthogonal way to add multimethods to single-dispatch object-oriented languages, without affecting existing code. The new mechanism also clarifies many differences between single and multiple dispatch.