Multiple Dispatch in Practice

被引:4
|
作者
Muschevici, Radu [1 ]
Potanin, Alex [1 ]
Tempero, Ewan [2 ]
Noble, James [1 ]
机构
[1] Victoria Univ Wellington, Wellington, New Zealand
[2] Univ Auckland, Auckland 1, New Zealand
关键词
Design; Experimentation; Languages; Measurement; double dispatch; empirical software engineering; instanceof; multimethods; multiple dispatch;
D O I
10.1145/1449955.1449808
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:563 / 582
页数:20
相关论文
共 50 条
  • [1] Multiple Dispatch in Practice
    Muschevici, Radu
    Potanin, Alex
    Tempero, Ewan
    Noble, James
    [J]. OOPSLA 2008 NASHVILLE, CONFERENCE PROCEEDINGS: MUSIC CITY USA, OOPSLA, 2008, : 563 - +
  • [2] Multiple dispatch as dispatch on tuples
    Leavens, GT
    Millstein, TD
    [J]. ACM SIGPLAN NOTICES, 1998, 33 (10) : 374 - 387
  • [3] Multiple dispatch
    Meyer, ML
    [J]. POWER ENGINEERING, 2002, 106 (04) : 8 - 8
  • [4] Multiple dispatch [2]
    Meyer, Mark L.
    [J]. Power Engineering (Barrington, Illinois), 2002, 106 (04):
  • [5] Modular Multiple Dispatch with Multiple Inheritance
    Allen, Eric
    Hallett, J. J.
    Luchangco, Victor
    Ryu, Sukyoung
    Steele, Guy L., Jr.
    [J]. APPLIED COMPUTING 2007, VOL 1 AND 2, 2007, : 1117 - 1121
  • [6] Integrating coercion with subtyping and multiple dispatch
    Hallett, J. J.
    Luchangco, Victor
    Ryu, Sukyoung
    Steele, Guy L., Jr.
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2010, 75 (09) : 787 - 795
  • [7] Integrating Coercion with Subtyping and Multiple Dispatch
    Hallett, J. J.
    Luchangco, Victor
    Ryu, Sukyoung
    Steele, Guy L., Jr.
    [J]. APPLIED COMPUTING 2008, VOLS 1-3, 2008, : 166 - +
  • [8] Multiple dispatch in reflective runtime environment
    Kumar, Rajeev
    Agrawal, Vikram
    [J]. COMPUTER LANGUAGES SYSTEMS & STRUCTURES, 2007, 33 (02) : 60 - 78
  • [9] Economic dispatch of multiple energy carriers
    Beigvand, Soheil Derafshi
    Abdi, Hamdi
    La Scala, Massimo
    [J]. ENERGY, 2017, 138 : 861 - 872
  • [10] Polymorphic Symmetric Multiple Dispatch with Variance
    Park, Gyunghee
    Hong, Jaemin
    Steele, Guy L., Jr.
    Ryu, Sukyoung
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):