Objects versus Abstract Data Types

Tweet
Posted on June 14, 2016 by Kwang Yul Seo

William R. Cook’s essay titled On Understanding Data Abstraction, Revisited explains the differences between two forms of data abstraction, objects and abstract data types. His another paper, Object-Oriented Programming Versus Abstract Data Types shows why distinguishing these two data abstractions are important:

Object-oriented programming and abstract data types can also be viewed as complementary implementation techniques: objects are centered around the constructors of a data abstraction, while abstract data types are organized around the operations. These differences have consequences relating to extensibility, efficiency, typing, and verification; in many cases the strengths of one paradigm are the weaknesses of the other. Most object-oriented programming languages support aspects of both techniques, not a unification of them, so an understanding of their relative merits is useful in designing programs.

Haskell type classes are also discussed in Cook’s essay. He described Haskell type classes as a powerful mechanism for parameterization and extensibility because type classes are unique in that they have properties of both objects and abstract data types: