Is while (true) with break bad programming practice?
There is a discrepancy between the two examples. The first will execute the “do something” at least once every time even if the statement is never true. The second will only “do something” when the statement evaluates to true. I think what you are looking for is a do-while loop. I 100% agree that while … Read more