Affiliation:
1. Purdue Univ., West Lafayette, IN
Abstract
We outline the design and detail the implementation of a language extension for abstracting types and for decoupling subtyping and inheritance in C++. This extension gives the user more of the flexibility of dynamic typing while retaining the efficiency and security of static typing. After a brief discussion of syntax and semantics of this language extension and examples of its use, we present and analyze three different implementation techniques: a preprocessor to a C++ compiler, an implementation in the front end of a C++ compiler, and a low-level implementation with back-end support. We follow with an analysis of the performance of the three implementation techniques and show that our extension actually allows subtype polymorphism to be implemented more efficiently than with virtual functions. We conclude with a discussion of the lessons we learned for future programming language design.
Publisher
Association for Computing Machinery (ACM)
Reference26 articles.
1. On subtyping and matching
2. Subtyping recursive types
3. Type abstraction using signatures. In Using and Porting GNU CC, R. M. StMlman, Ed. Free Software Foundation, Cambridge, Mass;BAUMGARTNER~ G.;Section,1995
4. Signatures: A language extension for improving type abstraction and subtype polymorphism in C++
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Overview of the Mathemagix Type System;Computer Mathematics;2014
2. Whiteoak;ACM SIGPLAN Notices;2008-10-27
3. A Feature Composition Problem and a Solution Based on C++ Template Metaprogramming;Generative and Transformational Techniques in Software Engineering;2006
4. Safe Structural Conformance for Java;The Computer Journal;2000-06-01