> > "frees the programmer from writing superfluous type signatures" is a > > weak (and dubious) advantage. I very often write "superfluous" type > > signatures first (to be sure I know what I'm asking my program to do) > > and only then let Haskell check it. Then I leave it in as good > > documentation. > > I agree with this. Perhaps > > Type Inference: deduces types automatically, so you don't have to clutter > up your code with type declarations. You can still write type declarations > for documentation purposes, and these will be automatically checked by the > compiler.
I also write top-level signatures usually, but inference is still really nice inside the function. Things like "let x = f y in ... + g x + ..." don't make you declare the type of 'x' and change the declaration if 'f' changes return type. You just have to change 'g', not everyone in between 'f' and 'g'. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe