4 ms·
Gotos aren't that infrequent in C and C++ written without exceptions or longjmps, and stack-based cleanup needs to occur. Last time I wrote a goto in a languag
by barrkel 13y ago
Gotos aren't that infrequent in C and C++ written without exceptions or longjmps, and stack-based cleanup needs to occur.
Last time I wrote a goto in a language that did have exceptions was the alignment portion of an unrolled loop implementation of a hash algorithm. Delphi doesn't support C-style switch statements where one case flows into the next; so the alignment switch did jumps into the unrolled loop body.
- mratzloff 13y agoYep. Gotos can be the cleanest way of handling certain errors in C.