4 ms·
In my office, everyone seems to avoid python like fire. The big reason seems to be that lack of static type checking makes their work harder in the long run.
by kubb 5y ago
In my office, everyone seems to avoid python like fire. The big reason seems to be that lack of static type checking makes their work harder in the long run.
- fredrb 5y agoDo they avoid all dynamic typed languages or only Python in particular?
- kubb 5y agoAll of them, but Python is the only one (apart from Javascript) that's approved for internal use.
- BiteCode_dev 5y agoPython 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
- santiagobasulto 5y agoThis is true. But it doesn't necessarily make Python bad. It's just not the right tool for the job. I love Python (I consider it my main language), but there are a ton of use cases for which I wouldn't use it for. Namely, if you need: robustness (provided by static typing, for example for critical systems), performance, parallelism. Scala, Rust, C# (Go, C++ also, but I dislike these two) are better options.