The dreaded M-R
Cale Gibbard
cgibbard at gmail.com
Sat Jan 28 19:57:51 EST 2006
On 28/01/06, Lennart Augustsson <lennart at augustsson.net> wrote:
> Remove the type signature for b and you will see the
> loss of sharing.
Nope, still not seeing it with either profiling or Debug.Trace. Also
-- the type signature I gave was polymorphic, so what's the deal? If
adding a polymorphic type signature fixes the problem, and a
polymorphic type signature can be inferred, why not simply treat the
source as if one had been written there?
> It mostly hurts people like John Hughes that don't
> have the energy to put in type signatures. ;)
Well, sure. I don't think that we should see exponential blowup in
complexity of some programs by leaving out type signatures (though if
it was only in sufficiently rare cases, I could put up with it).
> 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. :)
Me too. It's nice to be able to write quick programs where you leave
out the type signatures, but including them is always good for real
code. I also think that type signatures (and the type system in
general), makes it much easier to refactor code and work on code with
which you're unfamiliar.
- Cale
More information about the Haskell-prime
mailing list