‹ BackHN Continuity

Thread

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

173 points · 290 comments · ibobev

  1. oleganza · · focus · HN ↗
    Why is null-terminated C string considered a "billion dollar mistake", but UB isn't?
    1. ameliaquining · · focus · HN ↗
      I recommend this explanation of why UB is good and necessary (but C and C++ are doing it wrong, defining some things as UB that really shouldn&#x27;t be): <a href="https:&#x2F;&#x2F;www.ralfj.de&#x2F;blog&#x2F;2021&#x2F;11&#x2F;18&#x2F;ub-good-idea.html" rel="nofollow">https:&#x2F;&#x2F;www.ralfj.de&#x2F;blog&#x2F;2021&#x2F;11&#x2F;18&#x2F;ub-good-idea.html
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.