News for hackers. Stuff that matters.
Re:Source code of the file with the Zune bug (starts on line... by palish on Thursday January 01, 2009 @10:47PM (#417003)
...since it avoids duplication of the cleanup code (and the last thing you want is to have multiple similar blocks of code that need to be maintained/modified in tandem).

Isn't that the definition of "when to extract code into its own function"?

Re:Source code of the file with the Zune bug (starts on line... by thwarted on Thursday January 01, 2009 @11:20PM (#417026)
That may be hard to do if it's cleanup code, as the scope changes. Plus, it divorces, visually, the cleanup code from the main body. And there may be additional function call overhead (which may be avoidable by having the compiler in-line it). One reason to use goto is the style that all functions should have one entry and one exit. Even if the cleanup code was put into its own function, you'd still have to ensure that the function was called in all the right places before returning. Without gotos, the logic can become harder to follow through a series of if-else blocks.
Re:Source code of the file with the Zune bug (starts on line... by pmorici on Thursday January 01, 2009 @11:31PM (#417041)
In the case of clean up code where the duplicated code is usually specific to the current scope putting it in a function instead of a goto doesn't buy you anything really.