Haskell records compare Standard ML

This like many questions is answered (at least briefly) in the “history of haskell” paper

One of the most obvious omissions from early versions of Haskell
was the absence of records, offering named fields. Given that
records are extremely useful in practice, why were they omitted?

The strongest reason seems to have been that there was no obvi-
ous “right” design. There are a huge number of record systems,
variously supporting record extension, concatenation, update, and
polymorphism. All of them have a complicating effect on the type
system (e.g., row polymorphism and/or subtyping), which was al-
ready complicated enough. This extra complexity seemed partic-
ularly undesirable as we became aware that type classes could be
used to encode at least some of the power of records.

By the time the Haskell 1.3 design was under way, in 1993, the user
pressure for named fields in data structures was strong, so the com-
mittee eventually adopted a minimalist design originally suggested
by Mark Jones: record syntax in Haskell 1.3 (and subsequently) is
simply syntactic sugar for equivalent operation on regular algebraic
data types. Neither record-polymorphic operations nor subtyping
are supported.

cf: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf

5 Likes