3 ms·
> which will raise TypeError At runtime. In production. A compiler would catch the problem at build time, never causing an error in production.
by pilif 7y ago
> which will raise TypeError
At runtime. In production. A compiler would catch the problem at build time, never causing an error in production.
- kalleboo 7y ago> A compiler would catch the problem at build time And a nice IDE/code editor would catch the problem as you're typing it
- pilif 7y agoNot in a dynamic language. Finding all possible inputs to your method that’s calling float() on its Arguments in a dynamic language is akin to solving the halting problem. Also, error messages in an IDE can be ignored. Compiler errors can’t.
- dbcurtis 7y agoMaybe you missed this part: > So of course you actually need to exercise the code also, which is where the hypothesis package comes in. These are tests you should be doing anyway. Type checking does not excuse poor test coverage.