in reply to infinite loops == bad?
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
|
|---|