Poll: Imagine your team has to build a project with either types or tests
Poll: Imagine your team has to build a project with either types or tests. You can't have both.
Which would you pick?
Here’s why types won the poll:
✅ Types provide real-time inline feedback. Tests don’t. Types are tests with better ergonomics.
✅ Types eliminate the need for writing many basic, time-consuming, tedious tests. So types provide basic safety more quickly.
✅ Types assure all code fits together. Tests don’t unless 100% coverage is achieved and maintained, which is both difficult and uncommon.
✅ It’s easier to use types effectively. It’s easy to spot missing types. It’s hard to spot bad tests.
✅ Linters and compilers reliability catch missing types. But missing/bad tests are hard to spot because code coverage metrics are easy to game.
✅ It’s easier to find developers who who are effective with types than tests. Writing effective, fast, stable, and comprehensive tests is hard.
✅ Types tend to change less often, and one can “lean on the compiler” when they do, so they’re easier to change. Tests often flake and require ongoing, time-consuming changes as logic shifts.
✅ Types enable rich autocomplete. Tests don’t.
And here’s why tests should have won the poll:
Tests assure the code does what it’s supposed to. Types don’t.