2005
DOI: 10.1016/j.entcs.2005.09.011
|View full text |Cite
|
Sign up to set email alerts
|

Translating Double Dispatch into Single Dispatch

Abstract: Goals of flexibility and re-usability in typed object-oriented languages suggest the requirement of double dispatch, i.e., the mechanism of dynamically selecting a method not only according to the run-time type of the receiver (single dispatch), but also to the run-time type of the argument. However, many mainstream languages, such as, e.g., C++ and Java, do not provide it, resorting to only single dispatch. In this paper we present a general technique for adding double dispatch as a type-safe language feature… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1

Citation Types

0
2
0

Year Published

2005
2005
2015
2015

Publication Types

Select...
3
1

Relationship

1
3

Authors

Journals

citations
Cited by 4 publications
(2 citation statements)
references
References 17 publications
0
2
0
Order By: Relevance
“…We already did some work on multi-methods as a language extension of C++ (see [7,8]). In particular, the software doublecpp, http://doublecpp.sf.net, is based on a preprocessor that, given a program written in the extended C++, produces an equivalent program in standard C++, by applying a program transformation based on the double dispatch technique ( [30,26]).…”
Section: Discussionmentioning
confidence: 99%
“…We already did some work on multi-methods as a language extension of C++ (see [7,8]). In particular, the software doublecpp, http://doublecpp.sf.net, is based on a preprocessor that, given a program written in the extended C++, produces an equivalent program in standard C++, by applying a program transformation based on the double dispatch technique ( [30,26]).…”
Section: Discussionmentioning
confidence: 99%
“…For instance, they could wish to have a double-dispatch mechanism to ease implementations dealing with tree-like structures or binary methods [4,17]. This feature, which is a special case of multi-methods [11,21,8,3,22,23,10,12,1,27,2,14], allows a method implementation to be chosen with respect to the dynamic type (late-binding) of both the receiver and a single argument. It can be achieved programmatically through the visitor design pattern [19,15].…”
Section: Introductionmentioning
confidence: 99%