Object-oriented aspects of Moby

Abstract

Typical class-based languages, such as C#, C++, and Java, provide complex class mechanisms, but only weak module systems. These languages incorporate many of the features of rich module systems into their class constructs. In this paper, we describe an alternative approach. 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 simple.

We have incorporated this design into 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, and compare our design with others.


Last modified: April 6, 2004.
Comments to: John Reppy