Hmm, ask someone who claimed this was a "bad idea."
I would have thought that any cycle working for an indefinite period should end at some point, unless, of course, you expect your program to work forever.
If no criteria have yet been given for completion, there must be some other mechanism to break the loop hidden somewhere inside the loop, for example return, break or (yuck - Basic - but probably where the origins statement is Goto operator jumping somewhere outside the loop) to end the loop.
Code like this can be difficult to read and debug, and previously it was a sign that it wasn’t very important for the programmer to write clean code. However, currently with event-driven applications and structured error handling (see Try ... catch structure) there are clean and easy to read ways to exit any loop at any time, so although (true) can be used without problems.
Greetz
Alīna
source share