[clean-list] Re: no deriving Eq in Clean? / toString badness

Ronny Wichers Schreur ronny@cs.kun.nl
Thu, 15 Jul 2004 18:07:12 +0200


Ben Lippmeier writes (to the Clean mailing list):

> It's curious that you would choose to use (===) over (==) 
> for the more common equality (at least from the programmers 
> perspective) .. though I suppose that generics were added
> after the old (==) was in common use.

Right, and generics are still somewhat expiremental. Efficiency
is an issue: the generic equality (===) is much (much) slower
than a hand-written equality. We know how to optimise most
generic functions, but this is not built into our production
compiler.

>    instance toString [x] | toChar x

I think it was defined this way for the conversion of lists
of characters, for example

     Start
         =   toString ['abcde']


Cheers,

Ronny Wichers Schreur