[Haskell-cafe] Re: New slogan for haskell.org

Evan Laforge qdunkan at gmail.com
Thu Nov 29 19:01:27 EST 2007

> > "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'.

More information about the Haskell-Cafe mailing list