[Haskell-cafe] Type System vs Test Driven Development

Edward Z. Yang ezyang at MIT.EDU
Wed Jan 5 21:35:26 CET 2011


Haskell's type system makes large classes of traditional "unit tests"
irrelevant.  Here are some examples:

    - Tests that simply "run" code to make sure there are no syntax
      errors or typos,

    - Tests that exercise simple input validation that is handled by the
      type system, i.e. passing an integer to a function when it
      expects a string,

But, as many other people have mentioned, that doesn't nearly cover all
unit tests (although when I look at some people's unit tests, one might
think this was the case.)

Cheers,
Edward



More information about the Haskell-Cafe mailing list