‹ BackHN Continuity

Thread

C++26: Trivial infinite loops are no longer undefined behaviour

173 points · 290 comments · ibobev

  1. ahy1 · · focus · HN ↗
    Optimizations are nice and all. But they should not ever be allowed to change the behaviour of the program, from what is expected by reading the code.

    There are good uses for infinite loops.

    1. mwkaufma · · focus · HN ↗
      The good uses cases for trivial infinite loops is a vanishingly small subset of infinite loops.
      1. ahy1 · · focus · HN ↗
        It is obviously a subseet. But an important one.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.