4 ms·
Yes - to me, types are a form of test, but a potentially exhaustive one. If you can prove a property with types you don't need to do it with tests. Conversely,
by pjc50 5y ago
Yes - to me, types are a form of test, but a potentially exhaustive one. If you can prove a property with types you don't need to do it with tests. Conversely, if you don't have types, you need quite a lot of tests to prove your code doesn't immediately fall over if presented with badly formed data structures.