Multiple dispatch in practice

  • Authors:
  • Radu Muschevici;Alex Potanin;Ewan Tempero;James Noble

  • Affiliations:
  • Victoria University of Wellington, Wellington, New Zealand;Victoria University of Wellington, Wellington, New Zealand;University of Auckland, Auckland, New Zealand;Victoria University of Wellington, Wellington, New Zealand

  • Venue:
  • Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Multiple dispatch uses the run time types of more than one argument to a method call to determine which method body to run. While several languages over the last 20 years have provided multiple dispatch, most object-oriented languages still support only single dispatch forcing programmers to implement multiple dispatch manually when required. This paper presents an empirical study of the use of multiple dispatch in practice, considering six languages that support multiple dispatch, and also investigating the potential for multiple dispatch in Java programs. We hope that this study will help programmers understand the uses and abuses of multiple dispatch; virtual machine implementors optimise multiple dispatch; and language designers to evaluate the choice of providing multiple dispatch in new programming languages.