Re:Why I love Common Lisp and hate Java (2012)
by pvorb on Sunday November 04, 2018 @04:20PM
(#18378117)
I didn't critisize Haskell. I only criticized a statement about its type system.
> You're also forgetting that signature includes the name of the function.
That's what I wanted to point out. The name of a function is even more important than its types. Types alone seldomly give you the complete picture of what's going on in a function.
Of course the name can be wrong whereas types can't, but the name is less likely to be wrong than a comment.
By the time you've added type constrains through typeclasses, selected types named after the domain, and selected a suitable name for the function, it's possible to write against the signature with no knowledge of the body or comments.
You're also forgetting that signature includes the name of the function.
reverse :: [a] -> [a] is easy to understand by it's name and type.