Skip to content
quotesby

About this quote

What does it mean?
The code sets a flag indicating a string is valid, with a tongue‑in‑cheek comment about the hack.
In plain terms
It marks the string as ok, joking about how clever the trick is.
What can you take from it?
Use flags to track string validity, but be aware of hacky shortcuts.

Where it applies

  • debugging
  • optimizing legacy code

Putting it to work

  • add comments
  • use clear flag names

Questions to consider

  • Is the hack worth the readability cost?
  • How could this be expressed more clearly?

Another view

Such hacks can obscure intent and cause maintenance issues.

More from Larry Wall

  1. /* And you'll never guess what the dog had */ /* in its mouth... */

    Permalink to quote #241
  2. str->str_pok |= SP_FBM; /* deep magic */ s = (unsigned char*)(str->str_ptr); /* deeper magic */

    Permalink to quote #246
  3. echo 'Hmmm...you don't have Berkeley networking in libc.a...' echo 'but the Wollongong group seems to have hacked it in.

    Permalink to quote #248

Related quotes

  1. In general, if you think something isn't in Perl, try it out, because it usually is. :-)

    Larry WallLarry Wall quote #33
  2. Perl has a long tradition of working around compilers.

    Larry WallLarry Wall quote #95
  3. My programming language was solder.

    Terry PratchettTerry Pratchett quote #2