3 ms·
If it's a fallacy, why wouldn't a programmer do good to avoid UB?
by posterboy 10y ago
If it's a fallacy, why wouldn't a programmer do good to avoid UB?
- nkurz 10y agoAvoiding undefined behavior is good, and a good programmer tries to avoid undefined behavior. The fallacy is that there exists a population of C and C++ programmers who are skilled enough to always recognize and avoid undefined behavior. While you could define "a good programmer" as one who always recognizes and avoids undefined behavior, the unhelpful result would be concluding that very few good C or C++ programmers exist, possibly none.
- posterboy 10y agoBy modus tollens, C can't be a good language, then. Gosh!