Haskell folks say that their strong types help clear up a bit the meaning of the parts of the problem ("if it compiles it's right" is one of their mottos); and they also say those strong types help avoid introducing some bugs caused by changes in the design, because they cause type errors. They generally suggest to move as many assumptions as possible into the types.

A recent nice blog post, discussed on Reddit, shows some basic examples:

http://tomasp.net/blog/type-first-development.aspx

http://www.reddit.com/r/programming/comments/yad16/why_typefirst_development_matters/

In Haskell/Scala you sometimes see rather more refined examples.

Bye,
bearophile

Reply via email to