Remix.run Logo
deschutes an hour ago

On the other hand the idea that repeated iteration warrants a carve out is in itself curious.

I'm sure there will be some bullshit example of how after inlining you can find repetition like this but clearly other languages get along fine without prohibiting infinite loops.

Furthermore, if the goal was to allow for code motion between identical loops absent side effects they could have just said that and spared the ordinary infinite loop.

In a world where C++ is a language unrelated to C another reasonable position would have been to prohibit spelling loops that cannot terminate and provide a fix it for the possible meanings (unreachable, spin).

Injecting a side effect to solve this issue is just horrendous