[Haskell-cafe] What's the deal with Clean?

Evan Laforge qdunkan at gmail.com
Tue Nov 3 18:01:03 EST 2009

> So what's the deal with Clean? Why is it preferable to Haskell? Why is it not?

Purely from glancing through the language reference, two things that
it looks like clean has that I would love to have in haskell are
better records and better arrays.  The records don't implement any of
the fancy subtyping stuff that the various haskell proposals do, but
they have the benefits of a nicer syntax and actually being

Haskell arrays (by which I mean the IArray and MArray interfaces) are,
to me at least, really hard to use.  From little things like using
closed ranges where the rest of the world uses half-open ones and
opaque documentation and no consistency between IArray and MArray, to
bigger things like how do you insert or delete something.  My
conclusion, after wrestling with ixmap for 15 minutes, was to convert
to a list, concatMap across [(i, a)], convert back to an array, which
has the bonus of runtime crashes if you forget an 'i'.

Sorry if this turned into a rant about arrays, but it's bothered me
for a while :)  I think the clean guys got it right when they decided
to make good array support an explicit goal.  I suppose haskell has
since gone a different way with the various array fusion libraries
with listlike interfaces, and maybe that's better in the long term.
Maybe type families can make a nice interface someday.  Meanwhile it's
a mess though.

More information about the Haskell-Cafe mailing list