> Programmers usually assume that "undefined behavior" is some kind of "unknown behavior" and try to guess what's the worst case can be. Then they decide if they care or not.
The vast majority of developers are not aware of most undefined behaviours in the first place (except of course for those which tend to crash right away). Who knows by heart the "191 different kinds of undefined behaviour" mentioned above?
How do people learn to program? Not by reading language specifications but by from examples, trial and error. Once you had some success using some technique, it is extremely counter-intuitive and difficult to think that the (undefined!) behaviour of this exact same technique actually depends on the direction of the wind. And the day it eventually bites you hard, you are so hurt that you just stop using it and certainly do not make guesses about it.
Posted May 26, 2011 19:28 UTC (Thu) by nix (subscriber, #2304)
[Link]
That depends on the language, or rather on the sort of thing the language is typically used for. Communities built up around safety-critical software development, like Ada's, do tend to read the language standard. (Or so Robert Dewar assures us, and my limited experience with such communities suggests that he is right.)