J
James Kanze
Or, "your code stinks and so do you."
Obviously. My suggestion was a reference to ed, the original
Unix editor: it's only error message, on incorrect input, was a
'?', and Kernighan is purported said to have commented about it:
"an experienced programmer will usually know what is wrong."
(This may be apocryphal. I seemed to remember that it was on
the Unix 7th edition man page for ed, but a quick check failed
to reveal it either there or in the editor sections of the
second volume. It has, however, very much become part of the
general programming culture.)
And frequently do. Notably, the perfectly legal code:
int a = 0;
if (a = 1)
{
// do stuff
}
This will trigger a diagnostic on many implementations.
In a quality implementation, it won't trigger a diagnostic in
the sense of the standard, i.e. the warning message that it
outputs will not be documented as a diagnostic. As I've pointed
out before, however, this is one aspect where quality
implementations are really, really scarce.