News for hackers. Stuff that matters.
Re:Statically-typed error handling in Python using Mypy by HALtheWise on Sunday December 08, 2019 @10:15PM (#21740123)
Would you rather build safety-critical systems in Python (type-unsafe but memory-safe) or C++(type-safe but memory-unsafe)?

While static typing does catch code errors, in my experience they are mostly errors that would be caught somewhere else in the testing process. Memory safety issues are rarer, but also have a penchant for showing up unexpectedly and for crashing the entire system in unrecoverable ways.

Obviously, the best would be to have both kinds of safety, but people program safety critical systems in C++ all the time, and deal with the consequences. At least you can catch a TypeError in Python and handle it.

Re:Statically-typed error handling in Python using Mypy by ailideex on Monday December 09, 2019 @06:29AM (#21741804)
I would rather build it in a type-safe and memory-safe language - but if that is not allowed I would go for C++ even though I have my issues with it.

Catching TypeError in python and handling it is not a substitute for static typing.