Implementing signatures for C++

Gerald Baumgartner, Vincent F. Russo
1997 ACM Transactions on Programming Languages and Systems  
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
more » ... ion 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.
doi:10.1145/239912.239922 fatcat:cpwxhn6mfjfwxhzbmhkmecb65u