[Haskell-cafe] Signature of a function

Ketil Malde ketil+haskell at ii.uib.no
Wed Jan 12 02:04:38 EST 2005

Keith Wansbrough <Keith.Wansbrough at cl.cam.ac.uk> writes:

>> One might replace type signatures with comments, of course

> You mean one might add comments _as well as_ type signatures, of
> course.  The only thing worse than no comment is an incorrect
> comment.

Personally, I'd be inclined to extend that list to include vague
comment, trivial comments, ambigous comments.  And if you ever need to
comment on *how* a function works, the function is too complex and
should be refactored.  Spend your time making the code readable
instead.  (Readable code is more important than correct code --
readable code with bugs can be made correct, with unreadable code you
can never be sure of its correctness.)

</rant> :-)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list