3 ms·
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
by HALtheWise 7y ago
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.
- ailideex 7y agoI 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.