top | item 35929311

(no title)

buzz27 | 2 years 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.

discuss

order

whichdan|2 years ago

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.

madeofpalk|2 years ago

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.