4 ms·
If you were doing software development in the 80es when C++ was born, you wouldn't be asking this question. You'd either choose a language that allows undefine
by alexeiz 7y ago
If you were doing software development in the 80es when C++ was born, you wouldn't be asking this question. You'd either choose a language that allows undefined behavior and write a program that completes the work today or a language with all possible runtime checks and a program that completes the work sometime next week.
- taneq 7y agoSure, and in the 80s maybe it was justified, but in the 30 years since then, that justification has worn thin and IMO the cost of UB far outweighs the benefits. I've been writing software in C++ since the 90s and have been growing gradually more uneasy with it the whole time. The thing is, by the very nature of UB, it could have been (and still could be) patched out in a backwards-compatible way. At the very least, catching UB before the nasal demons get out would allow a bit more confidence in C++ code.