Records (was Re: [Haskell] Improvements to GHC)

Johannes Waldmann waldmann at
Tue Nov 22 05:15:36 EST 2005

On records in Haskell - can we start by formulating requirements
(design goals). What do we want from a record system,
and what are non-goals.

Some of the proposals here sound like records should be more like
objects (with some kind of inheritance). Do we really want this?
We already have inheritance (for interfaces). Isn't that enough?

My main objection is that concrete data types (e. g. records)
should not be exposed by a module anyway,
and should definitely not be a base for derivations
(Compare the OO design pattern literature).

Still if they are exposed (or while we're inside a module),
what makes the current records quite impractical
is the namespace issue (for component names).

Sure, one thing would be to invent some ad-hoc solution
(automatic qualification by type name or something)
but another possibility is to allow ad-hoc polymorphisms
generally in the language.

Just my 2 cent (and none of them new, I'm afraid)
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- -------

More information about the Haskell mailing list