The Design of a Class Mechanism for MOBY

01 May 1999

New Image

(PREVIOUS TITLE: CLASSES AND MODULES) We believe that modern programming languages require both a module system and a class mechanism. Unfortunately, current class constructs overlap significantly with module features, causing undue complexity. In this paper, we describe the design of a simple and elegant class mechanism that works in concert with the module system to support a rich class-based programming style. This minimal class construct is part of MOBY, and ML-like language with support for object-oriented features. We formalize MOBY in MINIMOBY, a core language that captures the essence of our design. We validate the expressiveness of our language by showing how various programming idioms from class-based languages can be written in MOBY.