2012
DOI: 10.1145/2398857.2384686
|View full text |Cite
|
Sign up to set email alerts
|

Open and efficient type switch for C++

Abstract: Selecting operations based on the run-time type of an object is key to many object-oriented and functional programming techniques. We present a technique for implementing open and efficient type switching on hierarchical extensible data types. The technique is general and copes well with C++ multiple inheritance.To simplify experimentation and gain realistic performance using production-quality compilers and tool chains, we implement a type switch construct as an ISO C++11 library, called Mach71 . This library… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
6
0

Year Published

2013
2013
2013
2013

Publication Types

Select...
1
1

Relationship

2
0

Authors

Journals

citations
Cited by 2 publications
(6 citation statements)
references
References 39 publications
0
6
0
Order By: Relevance
“…Our Match-statement extends the efficient type switch for C++ [3]. The core of this extension amounts to handling of multiple subjects (both polymorphic and non-polymorphic) as well as the ability to accept patterns in case clauses.…”
Section: Methodsmentioning
confidence: 99%
“…Our Match-statement extends the efficient type switch for C++ [3]. The core of this extension amounts to handling of multiple subjects (both polymorphic and non-polymorphic) as well as the ability to accept patterns in case clauses.…”
Section: Methodsmentioning
confidence: 99%
“…Mach7 employs an efficient type switch [41] under the hood to convert subject type to accepted type. Guards, n+k patterns, the equivalence combinator, and potentially some new user-defined patterns depend on capturing the structure (term) of lazily-evaluated expressions.…”
Section: Patterns As Expression Templatesmentioning
confidence: 99%
“…In a library setting, we are able to provide a more efficient implementation if we keep the arguments separated. This is why our Match statement extends the efficient type switch for C++ [41] to handle multiple subjects (both polymorphic and non-polymorphic) ( §3.5.1) and to accept patterns in case clauses ( §3.5.2).…”
Section: Match Statementmentioning
confidence: 99%
See 2 more Smart Citations