Keep the present Haskell record system!

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Mar 1 06:00:41 EST 2006


Ross Paterson <ross at soi.city.ac.uk> wrote:

> On Wed, Mar 01, 2006 at 08:26:14AM +0000, Henrik Nilsson wrote:
> > I'm increasingly convinced that the records should be left alone for
> > Haskell', possibly modulo some minor tweaks to polish the system.
> 
> Yes, no alternative candidate is available (specified, implemented,
> used).

Well, there _are_ some alternatives that have been specified and
implemented e.g. TREX in Hugs, and experimental languages like Daan
Leijen's Morrow.

But the main reason I can see for there being little use of these
candidates, is that they are not compatible with current Haskell.

Thus, although I agree that none is ready for inclusion in
Haskell-prime, I think we do need some mechanism for experimental
records to be tried out in real Haskell implementations before the
Haskell-double-prime committee starts its work.

Perhaps, taking the extensions-layering idea, we could say that the
current named-fields are encapsulated as an "extension that is part of
the standard".  Implementations could then introduce a flag to switch
off this particular extension (current records) in conjunction with
flags to switch on experimental replacements.  This would give a certain
flexibility for users to play with different systems, and the breaking
of compatibility would be explicitly notated, either by the build
options, or using a proposal like ticket #94.

My suggestion is that we separate out everything from the Report to do
with named-field records into something like a self-contained addendum.
Whilst still an official part of the language standard, it might also be
marked as a possibility for future removal.  This would make it clear
what parts of the language could be changed (or re-used without conflict)
in an alternative records system.

Regards,
    Malcolm


More information about the Haskell-prime mailing list