When you lack a type system which catches certain errors at compile-time, you need some other way of catching them. Unit tests are the typical solution.
Without compile-time type checking, every single line of code needs to be evaluated with a unit test to ensure there won't be any runtime syntax errors.
If you rename a function, type checking will catch that you rename all usages of it (or fail). With a type system to catch this, you must rely on more complete unit tests to catch anything you forget.
Types do not remove the need for unit tests, but they relieve some pressure from them.
cellularmitosis|2 years ago
Give this a watch: https://www.destroyallsoftware.com/talks/ideology
whichdan|2 years ago
madeofpalk|2 years ago
Types do not remove the need for unit tests, but they relieve some pressure from them.