|
ABSTRACT
One promising approach for adding object-oriented (OO) facilities to functional languages like ML is to generalize the existing datatype and function constructs to be hierarchical and extensible, so that datatype variants simulate classes and function cases simulate methods. This approach allows existing datatypes to be easily extended with both new operations and new variants, resolving a long-standing conflict between the functional and OO styles. However, previous designs based on this approach have been forced to give up modular typechecking, requiring whole-program checks to ensure type safety. We describe Extensible ML (eml), an ML-like language that supports hierarchical, extensible datatypes and functions while preserving purely modular typechecking. To achieve this result, eml's type system imposes a few requirements on datatype and function extensibility, but eml is still able to express both traditional functional and OO idioms. We have formalized a core version of eml and proven the associated type system sound, and we have developed a prototype interpreter for the language.
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
|
D. Bonniot. Type-checking multi-methods in ML (a modular approach). In The Ninth International Workshop on Foundations of Object-Oriented Languages, FOOL 9, Portland, Oregon, USA, January 2002.
|
 |
3
|
|
 |
4
|
|
| |
5
|
|
| |
6
|
|
| |
7
|
|
 |
8
|
|
| |
9
|
|
| |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
|
 |
14
|
Matthew Flatt , Shriram Krishnamurthi , Matthias Felleisen, Classes and mixins, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.171-183, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268961]
|
| |
15
|
J. Garrigue. Code reuse through polymorphic variants. In Workshop on Foundations of Software Engineering, November 2000.
|
| |
16
|
James Gosling , Bill Joy , Guy Steele , Gilad Bracha, Java Language Specification, Second Edition: The Java Series, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 2000
|
 |
17
|
|
| |
18
|
|
| |
19
|
|
 |
20
|
Sean McDirmid , Matthew Flatt , Wilson C. Hsieh, Jiazzi: new-age components for old-fasioned Java, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.211-222, October 14-18, 2001, Tampa Bay, FL, USA
|
| |
21
|
T. Millstein, C. Bleckner, and C. Chambers. Modular typechecking for hierarchically extensible datatypes and functions. Technical Report UW-CSE-02-07-05, Department of Computer Science and Engineering, University of Washington, July 2002. ftp://ftp.cs.washington.edu/tr/2002/07/UW-CSE-02-07-05.pdf.
|
| |
22
|
|
| |
23
|
T. Millstein and C. Chambers. Modular statically typed multimethods. Information and Computation, 175(1):76--118, May 2002.
|
| |
24
|
|
 |
25
|
|
| |
26
|
|
 |
27
|
|
| |
28
|
J. C. Reynolds. User defined types and procedural data structures as complementary approaches to data abstraction. In D. Gries, editor, Programming Methodology, A Collection of Articles by IFIP WG2.3, pages 309--317. Springer-Verlag, New York, NY, 1978.
|
| |
29
|
|
 |
30
|
|
CITED BY 11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Curtis Clifton , Todd Millstein , Gary T. Leavens , Craig Chambers, MultiJava: Design rationale, compiler implementation, and applications, ACM Transactions on Programming Languages and Systems (TOPLAS), v.28 n.3, p.517-575, May 2006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|