Created: 2021-09-09 09:15

Write your types so you don’t have to write tests.

And then test what you cannot cover with types.

#continuehere

4. types solve 80% of the need for unit tests

The main reason you write unit tests is to ensure you call functions correctly, don’t make typos, and get test failures when a function’s API changes.

A static type system tells you all that on every keypress. Runs right in your IDE. Gives you red squiggly lines when something doesn’t match.

Types are unit tests with 100% coverage, if you squint a little.

You do need [integration] tests for behaviors.