The dreaded M-R
Lennart Augustsson
lennart at augustsson.net
Mon Jan 30 22:08:04 EST 2006
John Hughes wrote:
> 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.
So what if it's in a lot of places? The compiler tells you where to
change. Each change takes a few seconds. Even with hundreds of changes
you'd probably be done in under half an hour.
Of course, you'd like a tool to do these kind of changes.
All that said, I think not being able to give a name to a context is
a real weakness in Haskell. It's one of the few things that cannot
be named, and being able to do so would help refactoring and modularity.
-- Lennart
More information about the Haskell-prime
mailing list