3 ms·
> need incredible amounts of tests to compensate for the lack of compile-time type checking can you explain this a bit more? it seems to me that test coverage
by buzz27 3y ago
> need incredible amounts of tests to compensate for the lack of compile-time type checking
can you explain this a bit more? it seems to me that test coverage and typing solve different problems.
- whichdan 3y agoWithout 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.
- cellularmitosis 3y agoWhen 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. Give this a watch: https://www.destroyallsoftware.com/talks/ideology https://www.destroyallsoftware.com/talks/ideology
- madeofpalk 3y agoIf 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.