in reply to Re^3: The behavior is [sic] undefined
in thread The behavior is [sic] undefined
A prescriptivist will tell you that once a term is defined that the definition can't change. Something that is unspecified and that is referred to as an "undefined" combination of language features is expected to be allowed to change, even within the same project's different versions.
By saying you have "defined" it, you're effectively saying that you've found out what it should do rather than what id did do. That's not the intent, I think, of the term "undefined behavior". An "undefined behavior" as the term is used is one that may be different in a different implementation, on a different platform, or in next week's release. It is both unspecified and the empirical result, while often possible to ascertain, is not to be taken as definitive. If there is no definitive semantic, then the construct is undefined.
The term "undefined" means whatever it is describing defies a fixed meaning. Looking at Webster's, we can see several definitions of "define". An "undefined behavior", as the term is used, is one that the specification has not, according to definition 1a, determined the essential qualities or meaning of the construct or its behavior. The spec has not, according to 1b, set "forth the meaning" for further implementations. Definition 1c is ironically not applicable despite mentioning computers. According to 2a, to define can mean "to demarcate" or "to fix the limits of" something, and your empirical tests of one implementation do not fix any limits on others as only the specification can. Under any of these definitions of "define", a behavior marked in a specification as "undefined" has not been defined by observation of results in an implementation. Perhaps it has been connoted, but not defined.
So perhaps the term shouldn't be used because it is difficult for some to understand, but I don't think it's actually that far from a correct usage. Any combination of language features that together do not have a fixed meaning could be said to remain undefined.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: The behavior is [sic] undefined
by BrowserUk (Patriarch) on May 15, 2009 at 06:28 UTC | |
by gwadej (Chaplain) on May 15, 2009 at 13:17 UTC | |
by mr_mischief (Monsignor) on May 15, 2009 at 15:40 UTC | |
by John M. Dlugosz (Monsignor) on May 15, 2009 at 17:36 UTC | |
by BrowserUk (Patriarch) on May 16, 2009 at 22:46 UTC | |
|
Re^5: The behavior is [sic] undefined
by John M. Dlugosz (Monsignor) on May 15, 2009 at 16:46 UTC |