[Haskell-cafe] When to use fancy types [Re: NumberTheory library]

Lennart Augustsson lennart at augustsson.net
Thu May 12 12:13:11 EDT 2005


Thank you for saying what I was too lazy to say myself. :)

	-- Lennart

Jan-Willem Maessen wrote:
> 
> On May 10, 2005, at 4:14 AM, Bo Herlin wrote:
> 
>> > Well, part of what I was doing was experimenting with what a library 
>> like
>> > this should look like, even more than what it should do.  For some 
>> reason,
>> > I kind of like writing this:
>> >
>> >     *Math.Prime> is Prime 42
>> >     False
>> >
>> > instead of this:
>> >
>> >     *Math.Prime> isPrime 42
>> >     False
>>
>> Great! I like this a LOT.
> 
> 
> Why not use a function?
> 
> What's wrong with a function?
> 
> There no need to go leaping for a multiparameter type class with a 
> functional dependency!  Just use a function.
> 
> [With apologies to John Cleese]


More information about the Haskell-Cafe mailing list