Skip to content
quotesby

About this quote

What does it mean?
A conditional checks for an error string in a buffer, with a comment noting the code is invisible.
In plain terms
The code looks for an error message but is hidden.
What can you take from it?
Make error checks visible and maintainable.

Where it applies

  • when parsing error messages
  • in legacy error handling

Putting it to work

  • log error checks
  • remove dead code

Questions to consider

  • Why keep code that never executes?
  • How to detect dead branches?

Another view

If the code never runs, it may be dead and should be removed.

More from Larry Wall

  1. /* we have tried to make this normal case as abnormal as possible */

    Permalink to quote #258
  2. /* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. */

    Permalink to quote #264
  3. Your csh still thinks true is false. Write to your vendor today and tell them that next year Configure ought to 'rm /bin/csh' unless they fix their blasted she…

    Permalink to quote #257

Related quotes

  1. Hmm, doubtful. The source code generally wasn't there when I needed it.

    Larry WallLarry Wall quote #311
  2. A wise man's kingdom is his own breast: or, if he ever looks farther, it will only be to the judgment of a select few, who are free from prejudices, and capabl…

    David HumeDavid Hume quote #1
  3. Truth lies within a little and certain compass, but error is immense.

    Henry, 1st Viscount Bolingbroke St JohnHenry, 1st Viscount Bolingbroke St John quote #1