3 ms·
I find TDD to be somewhat redundant when I code Haskell. The types cover more ground than typical unit tests -- and if you follow a few simple principles (avoi
by Peaker 15y ago
I find TDD to be somewhat redundant when I code Haskell.
The types cover more ground than typical unit tests -- and if you follow a few simple principles (avoid partial functions and some of the worse part of the libraries), you can trust the compiled code more than you trust UT'd code.
Production-quality Haskell does usually employ tests, and those are a joy to write (with QuickCheck), but there's little need to spend time writing tests at the early coding phases.
When doing large refactorings, you can also trust the type system to guide you and find virtually all bugs introduced.