2 ms·
Unit tests aren’t a replacement for static types. Tests aren’t machine readable so you lose all those nice IDE refactoring features and have to manually keep th
by zarzavat 5y ago
Unit tests aren’t a replacement for static types. Tests aren’t machine readable so you lose all those nice IDE refactoring features and have to manually keep them up to date. Also running a test suite takes time, it takes a lot longer to run a test suite than it does to get live typecheck, which means you cannot use tests while you are editing. And you probably don’t want to clog up your test suite with endless “x is a Y” tests.
In general dynamic types incentivize the status quo and promote codebase ossification, and somewhat ironically make rapid prototyping harder.