5 ms·
GOTO statements are not bad, they make your code run 10% faster while taking just 10 times as long to debug. So if your code gets executed millions of times pe
by jarfil 12y ago
GOTO statements are not bad, they make your code run 10% faster while taking just 10 times as long to debug.
So if your code gets executed millions of times per second, like in some OS kernel, it may be wise to use GOTOs.
Otherwise, stay away.
- vardump 12y agoGotos are nowhere near as hard to debug as exceptions.
- pontifexa 12y agoHow's that? To debug GOTOs you have to place breakpoints on each possible detection of error (or at a shared trampoline). To debug exceptions, you just enable first-chance exception handling for the kind of exception you're interested in and you're done.