Skip to main content
Log in

Should ML be Object-Oriented?

  • Original Paper
  • Published:
Formal Aspects of Computing

Abstract.

At a fundamental level, functional and object-oriented programming languages are all ‘higher-order’, in the sense that they support computing with values that are themselves pieces of program code encapsulated with a local environment. In functional languages these ‘active’ values are functions, while in object-oriented languages they are objects. Both styles of higher-order language claim to provide good support for writing adaptable programs, but functional and object-oriented languages achieve this adaptability in different ways: functional programs rely on parameterisation at the value, type and module level, while object-oriented languages rely primarily on subtyping and implementation inheritance. Here we compare these two approaches, mainly in terms of the features and properties of their type systems, and consider the benefits and disadvantages of unifying (or merging) the two paradigms by adding object-oriented features to ML as a base language. We argue that while some of the simpler aspects of object-oriented languages are compatible with ML, adding a full- edged class-based object system to ML leads to an excessively complex type system and relatively little expressive gain, especially if we aim to preserve that mostly functional style of programming that is a major advantage of ML.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Author information

Authors and Affiliations

Authors

Additional information

Received March 2002 / Accepted in revised form April 2002

Rights and permissions

Reprints and permissions

About this article

Cite this article

MacQueen, D. Should ML be Object-Oriented?. Form Aspects Comput 13, 214–232 (2002). https://doi.org/10.1007/s001650200010

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s001650200010

Navigation