title: When is a while(True) loop appropriate?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/390481/is-whiletrue-bad-programming-practice">is while(true) bad programming practice?</a><br>
    <a href="https://stackoverflow.com/questions/3947055/whats-the-point-of-using-while-true">What&#39;s the point of using &ldquo;while (true) {&hellip;}&rdquo;?</a>  </p>
  </blockquote>
  
  
  
  <p>I've always considered it bad practice to use <code>while(true)</code>. Many people think it's okay.</p>
  
  <p>Why would you want to purposefully create an infinite loop? The only two reasons I can think of are:</p>
  
  <ol>
  <li>You're being devious</li>
  <li>You're being lazy</li>
  </ol>
  
  <p>When, if ever, is it appropriate to use this? And why would you use this over an algorithm?</p>