|
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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
 |
2
|
|
 |
3
|
|
| |
4
|
BAUMGARTNER~ G. 1995. Type abstraction using signatures. In Using and Porting GNU CC, R. M. StMlman, Ed. Free Software Foundation, Cambridge, Mass, Section 7.6, 180-182. Available as part of the GCC-2.7.2 distribution.
|
| |
5
|
|
 |
6
|
Andrew Black , Norman Hutchinson , Eric Jul , Henry Levy, Object structure in the Emerald system, Conference proceedings on Object-oriented programming systems, languages and applications, p.78-86, September 29-October 02, 1986, Portland, Oregon, United States
|
| |
7
|
BRUCE, K. B. 1997. Typing in object-oriented languages: Achieving expressibility and safety. A CM Comput. Surv. To be published.
|
| |
8
|
|
 |
9
|
Luca Cardelli , James Donahue , Lucille Glassman , Mick Jordan , Bill Kalsow , Greg Nelson, Modula-3 language definition, ACM SIGPLAN Notices, v.27 n.8, p.15-42, Aug. 1992
[doi> 10.1145/142137.142141]
|
 |
10
|
|
 |
11
|
|
| |
12
|
|
| |
13
|
|
| |
14
|
GRANSTON~ E. D. AND RUSSO~ V. F. 1991. Signature-based polymorphism for C~~. In Proceedings of the 1991 USENIX C~~ Conference. USENIX Assoc., Berkeley, Calif., 65-79.
|
 |
15
|
Paul Hudak , Simon Peyton Jones , Philip Wadler , Brian Boutel , Jon Fairbairn , Joseph Fasel , María M. Guzmán , Kevin Hammond , John Hughes , Thomas Johnsson , Dick Kieburtz , Rishiyur Nikhil , Will Partain , John Peterson, Report on the programming language Haskell: a non-strict, purely functional language version 1.2, ACM SIGPLAN Notices, v.27 n.5, p.1-164, May 1992
[doi> 10.1145/130697.130699]
|
| |
16
|
|
| |
17
|
MAcQUEEN, D. B. 1985. Modules for Standard ML. Polymorphism 2, 2 (Oct.), PAGES.
|
 |
18
|
|
| |
19
|
Object Management Group 1995. The Common Object Request Broker: Architecture and SpecificationDOT, Rev. 2.0ED ed. Object Management Group, Framingham, Mass.
|
 |
20
|
Craig Schaffert , Topher Cooper , Bruce Bullis , Mike Kilian , Carrie Wilpolt, An introduction to Trellis/Owl, Conference proceedings on Object-oriented programming systems, languages and applications, p.9-16, September 29-October 02, 1986, Portland, Oregon, United States
|
 |
21
|
|
| |
22
|
|
| |
23
|
STALLMAN, R. M. 1995. Using and Porting GNU CC. Free Software Foundation, Cambridge, Mass. Available as part of the GCC-2.7.2 distribution.
|
 |
24
|
|
| |
25
|
S. M. Watt , R. D. Jenks , R. S. Sutor , B. M. Trager, The scratchpad II type system domains and subdomains, Computing tools for scientific problem solving, Academic Press, Inc., Duluth, MN, 1990
|
| |
26
|
|
REVIEW
"Frank Lawrence Friedman : Reviewer"
The authors introduce a simple yet powerful extension to C++ for
abstracting types and decoupling subtyping and inheritance. They argue
that the current dual purpose of the C++ class construct—to define
and implement a type, and to serve
more...
|