3 ms·
> This is an argument for unit tests, not for a statically typed language. > Type errors tend to be very few and far between compared to logic errors. The div
by Dewie 12y ago
> This is an argument for unit tests, not for a statically typed language.
> Type errors tend to be very few and far between compared to logic errors.
The divide between type errors and logic errors is entirely dependent on the language and the discipline/inclination of the developers. In some languages, what you might think of as "logic errors" can easily be moved to "type errors". And in that regard, the difference between what is unit testable and statically typeable is also entirely dependent on the language and the discipline/inclination of the developer. So what might have to be expressed as unit tests in one language, might be checked by the static type system in another language.
But I can understand how some people might think that static type systems are only for catching things like "error: expected addition of integers, but got attempt at adding an integer with a FireTruck". ;)