In this thread, we'll look at some interesting goto examples in C or C++.
infinite_loop:
// code goes here
goto infinite_loop;
Why it's better than the alternatives:
1. It is precise. The goto language construct generates an unconditional branch.
Alternatives rely on structures that enable conditional branching and a degenerate always-true condition.
2. The label expresses the aim without additional commentary.
3. The reader is not required to inspect the intervening code for early breaks (but an unscrupulous hacker might still fake continuing with an early goto).