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.
Similar content being viewed by others
Author information
Authors and Affiliations
Additional information
Received March 2002 / Accepted in revised form April 2002
Rights 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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s001650200010