C++26: Trivial infinite loops are no longer undefined behaviour
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
C++26: Trivial infinite loops are no longer undefined behaviour
Unofficial Hacker News client; not affiliated with Y Combinator.
BobbyTables2 · · focus · HN ↗
Idiots!
Don’t they really that people write real programs to solve real problems? This isn’t a theoretical academic exercise!
Sharlin · · focus · HN ↗
nh2 · · focus · HN ↗
It breaks the most fundamental debugging expectations (such as "delete code until problem disappears") if the fundamental, minimal building blocks of a language, when on their own, do random rubbish.
To understand a program that does something, better first understand a program that does nothing.
As a fan of sensible analogies:
You put a salad bowl with vinegar into the fridge and notice that when you do that, the fridge stinks afterwards. You try again without the vinegar, then without the salad. In C++ world, upon receiving the empty bowl, the fridge detonates ("it is not useful"), blowing up your house. That is not OK.
Jaxan · · focus · HN ↗
vlovich123 · · focus · HN ↗
rcxdude · · focus · HN ↗
vlovich123 · · focus · HN ↗