by bcoates · 13y ago · 0 comments
init;
do {
stuff;
if (fail) continue;
morestuff;
} while (0);
cleanup;
Which I've seen in real code released to the public. Whoever does either of those things instead of just using a goto should be flogged in the town square.edit: Other usually-bad alternatives to goto are the pyramid-of-nested-ifs or a set of running "bad" flags/enum that disables each operation downstream of the error until the cleanup is reached.
No comments yet.