The rap against "while True:" loops
greg
greg at cosc.canterbury.ac.nz
Mon Oct 12 04:02:44 EDT 2009
Steven D'Aprano wrote:
> Back in ancient days when dinosaurs walked the Earth,
> and I was programming in THINK Pascal on Apple Macintosh System 6, I'd go
> into nervous palpitations writing the equivalent of "while True" because
> if I got it wrong, I'd lock up the machine and need to hit the power
> button.
That was true when just about *anything* went wrong in that
environment, though -- I don't think you can blame while True
in particular for it.
(I remember my earliest Mac programming experiences, back
when the Mac was too small to run its own development
environment, and everything had to be cross-compiled.
Debugging consisted of counting the number of times
SysBeep got called before the bomb icon appeared...)
--
Greg
More information about the Python-list
mailing list