|
Warning: The download time has expired please click on the item to try again.
ABSTRACT
Typical class-based languages, such as C++ and JAVA, provide complex class mechanisms but only weak module systems. In fact, classes in these languages incorporate many of the features found in richer module mechanisms. In this paper, we describe an alternative approach to designing a language that has both classes and modules. In our design, we rely on a rich ML-style module system to provide features such as visibility control and parameterization, while providing a minimal class mechanism that includes only those features needed to support inheritance. Programmers can then use the combination of modules and classes to implement the full range of class-based features and idioms. Our approach has the advantage that it provides a full-featured module system (useful in its own right), while keeping the class mechanism quite simple.We have incorporated this design in MOBY, which is an ML-style language that supports class-based object-oriented programming. In this paper, we describe our design via a series of simple examples, show how various class-based features and idioms are realized in MOBY, compare our design with others, and sketch its formal semantics.
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.
 |
AC93
|
|
| |
AC96
|
|
| |
AG98
|
|
| |
BCC+96
|
|
| |
BFP97
|
Brace, K. B., A. Fiech, and L. Petersen. Subtyping is not a good "match" for object-oriented languages, in ECOOP'97, vol. 1241 of LNCS, New York, NY, 1997. Springer-Verlag, pp. 104-127.
|
| |
BPV98
|
Bruce, K. B., L. Petersen, and J. ~anderwaart. Modules in LOOM: Classes are not enough. Available from http: //www. cs. williams, edu/~kim, April 1998.
|
| |
BSv95
|
|
| |
CDG+89
|
Cardelli, L., J. Donahue, L. Glassman, M. Jordan, B. Kalsow, and G. Nelson. Modula-3 report (revised). Technical Report 52, Digital System Research Center, Palo Alto, CA, November 1989.
|
 |
CHC90
|
|
| |
Coo89
|
Cook, W. R. A proposal for making Eiffel type-safe. In ECOOP'89, 1989, pp. 57-72.
|
| |
Fis96
|
|
| |
FM95
|
|
| |
FR99
|
Fisher, K. and J. Reppy. Foundations for MOB Y classes. Technical Memorandum, Bell Labs, Lucent Technologies, Murray Hill, NJ, February 1999.
|
| |
GJS96
|
|
 |
HL94
|
|
| |
HS97
|
Harper, R. and C. Stone. An interpretation of Standard ML in type theory. Technical Report CMU-CS-97-147, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, June 1997.
|
| |
Jav97
|
Inner classes specification, February 1997. Available from http: / / java. sun. com/products/jDK/1.1.
|
 |
KLM94
|
Dinesh Katiyar , David Luckham , John Mitchell, A type system for prototyping languages, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.138-150, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.177838]
|
 |
Ler94
|
Xavier Leroy, Manifest types, modules, and separate compilation, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.109-122, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.176926]
|
| |
Ler96
|
Leroy, X. A syntacfc theory of type generativity and sharing. JFP, 6(5), September 1996, pp. 1-32.
|
| |
Ler98
|
Leroy, X. The Objective Caml System (release 2.00), August 1998. Available from http: //pauillac. inria, fr/caml.
|
 |
Mac84
|
|
| |
MTHM97
|
|
| |
Pro95
|
Programming Methodology Group, MIT LCS, Cambridge, MA. Theta Reference Manual (Preliminary Version), February 1995. Available from httD: //www .pmg. lcs .mit. edu/Theta, html.
|
| |
PT93
|
Pierce, B. C, and D. N. Turner. Statically typed friendly functions via partially abstract types. Technical Report ECS-LFCS-93-256, University of Edinburgh, LFCS, April 1993. Also available as INRIA-Rocquencourt Rapport de Recherche No. 1899.
|
 |
PT98
|
|
| |
Rém94
|
|
| |
RR96a
|
Reppy, J. H. and J. G. Riecke. Classes in Object ML via modules. In FOOL3, July 1996.
|
 |
RR96b
|
|
| |
RS98
|
Riecke, J. G. and C. Stone. Privacy via subsumpfion. In FOOL5, January 1998. A longer version will appear in TAPOS.
|
| |
RV98
|
|
| |
Str94
|
|
| |
Str97
|
|
| |
Szy92
|
|
| |
Vou98
|
Vouillon, J. Using modules as classes. In FOOL5, January 1998.
|
|