The dreaded M-R

John Hughes rjmh at cs.chalmers.se
Mon Jan 30 08:20:44 EST 2006


Lennart Augustsson wrote:

>> On the subject of type signatures, I don't want to
>> make them mandatory, but I think they should be strongly
>> encouraged.  I don't buy the argument that they make
>> refactoring programs that much harder.  It's still
>> very easy to do, the type checker will tell you exactly
>> where.  :) 
>
It can still be in a LOT of places--far too many for comfort. I'm not 
making this
up--I've experienced severe problems in practice caused by this very 
point. It depends
what kind of code you're working with, of course. I'm not saying type 
signatures
are ALWAYS a problem for refactoring, just that they sometimes are--and that
it makes sense to leave it up the programmer whether or not to include them.

By the way, you leave out a lot of type signatures too. Your Djinn 
module contains
29 declarations with type signatures--and 17 without. The 17 are local, 
but local
declarations are precisely those where, without the M-R, a lack of 
sharing would be
most likely to bite.

John


More information about the Haskell-prime mailing list