4 ms·
Python is no Haskell but type hints does reach Pareto level for catching bugs. Mypy is now well integrated into IDE so no reason to have a type error anymore.
by BiteCode_dev 5y ago
Python is no Haskell but type hints does reach Pareto level for catching bugs. Mypy is now well integrated into IDE so no reason to have a type error anymore.
I will switch to python 3.10 as soon as it's released just for the better error messages and the typing goodies though.
- kubb 5y agoApparently the type hints don't work because people don't use them in libraries.
- ptx 5y agoI was going to object that one reason for not using static typing is that certain perfectly reasonable patterns are difficult to describe to the type checker, e.g. sharing tests between TestCase classes by using a mix-in – but apparently[1] Python 3.8 solved that particular case. [1] https://stackoverflow.com/a/60323489/896841 https://stackoverflow.com/a/60323489/896841