http://qs1969.pair.com?node_id=482947


in reply to Re^2: On Commenting Out 'use strict;'
in thread On Commenting Out 'use strict;'

I would say that IMHO there are no trivial error messages...

Step back for a second. What you just wrote is about as defensible as the statement "IMHO there are no bugs."

You want to see a trivial error message? Here, stick this anywhere in your code:

die "I'm sooo not trivial!";
A trivial error message or warning is nothing more than a design bug.

Consider for example the warning

Useless use of a constant in void context
If you read the follow-ups to Why no warnings for 1 in void context?, you'll learn that perl has a special check so that this warning is omitted if the constant is 1 or 0, or a few other esoteric values. I don't know about Larry (or whoever coded that particular bit of perl), but I'm sure that if it had been me who coded that I would have missed adding these checks first time around, and only figured that I needed them after seeing how perfectly sound code was suddenly spitting useless warnings. I.e. there is no a priori guarantee that warnings are non-trivial; this is only a function of the skill of the programmer.

My point is that, the flip-side to the OPs observation is the burden on programmers to make their error messages non-trivial, that this also requires work, and that the more skilled you are as a programmer in keeping your error messages non-trivial, the less likely it is that users will ignore them.

the lowliest monk