in reply to infinite loops == bad?

Infinite loops (a loop with an unconditionally true condition) are generally bad, and should be re-structured as potentially infinite loops. A well written server that relies on a loop as it's main form of receiving input should have a situation in which it's loop condition can be negated, thereby exitting the loop. This will allow for cleanup and shutdown of any periphery functions it's performing. A good example would be a simple HTTP server where the condition of the loop would be the output from a blocking socket, so if for whatever reason the socket is closed, it can clean up (i.e close log file handles) and possibly notify the administrator.

I can't think of any conditions in where you would need an infinitely running loop (any offers?) so I'd say that in theory they are a bad thing. It's also considered bad practice to have 'busy-wait loops'[1] when working with IO as you should generally be waiting for input to come instead of deliberately putting delays within the loop. One reason is that you *might* (just might) receive a shedload of data while sleeping away which could potentially break things within (and without) the program (i.e stack overflow).
HTH

_________
broquaint

[1] a busy-wait loop is one which has specified delays within the program e.g while(<FOO>) { &do_stuff($_); sleep 5; }. More details here