[Haskell-cafe] Re: [Haskell] installing streams library

Jacques Carette carette at mcmaster.ca
Wed May 31 12:07:29 EDT 2006


Bulat Ziganshin wrote:
> i'm not against your idea, you absolutely right that this will be more
> Haskell way, but can this be implemented without additional
> complications for library users?
>   
C is a language which pushes the boundaries of "no complications" (ie 
convenience) quite far (and yet claims to have types).  The beauty of 
Haskell is that you are forced to think before you lay down some code, 
to make sure what you write really is meaningful.

A Haskell API for a library /can/ likewise force its users to think 
about what they really need to do before they lay down some code.  Yes, 
that makes the use more complicated.  Convenience is a short-term gain, 
and going from 'convenient' languages (think Perl and Python here) to 
Haskell is quite the shock!  But think of the long-term gains of doing 
it correctly / the Haskell way.

I am completely biased in this regard:  I have spent several years 
maintaining ~800Kloc of legacy dynamically typed [commercial] code.  A 
lot of this code has a life-span of roughly 20 years [ie once written, 
it takes an average of 20 years before it gets re-written].  That 
experience has converted me to a static-type fan, as well as a fan of 
designs that are for the "long term"; short-term convenience is 
something that is great for short-lived code (< 5 years is short-lived 
to me ;-) ). 

I think the choice really boils down to the expected life-span of your 
library, as well as the expected size of the user base. 

Jacques (stepping off my soap-box now...)


More information about the Haskell-Cafe mailing list