while true: !!!

Greg Jorgensen gregj at pobox.com
Sat Dec 16 08:16:12 CET 2000


I worked on a huge C/C++ mutant project a few years ago. One of the
programmers thought this was clever:

  // buried in some nested #include file
  #define FOREVER true
  ...
  while (FOREVER) { ... }

Not to be outdone, another programmer introduced this abomination:

  #define FOR_EVER for ( ; ; )
  ..
  FOR_EVER { ... }

Clearly a case of two programmers confusing "idiom" with "idiot." Of course
when I asked why on earth anyone would do this both programmers argued that
their way was more clear than the standard idiom (more clear to whom?). I
can't see how either of their macros is more clear than the standard C
idioms. I'm convinced that this kind of thing is just attention-getting and
showing off. Real programmers don't have any problem understanding while (1)
{ ... }.

--
Greg Jorgensen
Deschooling Society
Portland, Oregon, USA
gregj at pobox.com





More information about the Python-list mailing list