Re:Python programming is drowning in red tape
by jordic on Wednesday April 15, 2020 @08:48AM
(#22877072)
Most of the problems you mention could also be solved with a good test suit...
I'm not against mypy.. but after working near two years with typescript.. if I have to type I prefer to do it with compiled things...
At what felt like the 1000th runtime problem because of some type confusion somewhere (or just forgetting "await", which is essentially a no-op, since you got a promise that you threw away), and a lot of these problems happening much later than where the actual bug in the code was, I was ready to throw in the towel and bid python--and all other dynamic languages--good bye.
So I decided to try out mypy as some kind of last hurrah, and it paid out immediately. Adding the types went pretty quickly, and after that numerous problems were caught by the type checker, instead of manifesting as some obscure runtime problem down the way.