Talk:undefined behavior


Well, it's slightly off-topic (though related), so I put it on the discussion page only.

What I like much and hence never forgot is what I once read in the CUJ about Undefined Behavior in the C89 standard:

"Undefined behaviour is great, because it allows me to convince the company that provided the compiler I use that what I PERSONALLY WOULD FAVOUR needs to be implemented in this case."

(Please be sure to read the above once more if you do not understand the subtle irony at first reading.)

I think it nicely expresses that any "per standard" undefined behaviour may of course be replaced with defined behaviour on a "per-implementation" base ... but that would typically also restrict the user community of that implementation, or even destroy it, if the "typical demands" of that community are not met.

(It comes from my memory only, and I read it long ago, probably 15 or 20 years, but I think the citation is to be attributed to Mike Feathers - if you know better, please correct it.)

--Mwe (talk) 07:10, 24 May 2015 (PDT)