[Haskell-cafe] HSpec vs Doctest for TDD

Frerich Raabe raabe at froglogic.com
Wed Jun 25 22:21:53 UTC 2014

On 2014-06-25 18:05, MigMit wrote:
> Again, nobody here suggests that tests aren't necessary.

And rightfully so! TDD is not "a poor substitute for type safety" (as you 
put it in your earlier mail) at all.

In fact, strong type systems complement test-driven development very nicely. 
An expressive type system greatly simplifies testing because the compiler can 
catch a larger classes of mistakes and because - in the case of pure 
functions - the function signatures very clearly communicate the required 
input and output. There are no hidden dependencies and there's no setup or 
tear-down work required.

So I'd argue that test-driven development is relevant *because* of Haskell's 
type system, not *in spite of* it.

Frerich Raabe - raabe at froglogic.com
www.froglogic.com - Multi-Platform GUI Testing

More information about the Haskell-Cafe mailing list