Originally Posted by
phantomotap
Yes, in C, there are certainly cases where `goto' is the better solution because it isolates otherwise duplicated code without wonky cleanup functions having several references to local functions. (Don't quote me on it though; if the situation comes up where a newbie is using `goto' poorly I will simply tell them "You should not be using `goto' as it is evil." rather than take the chance on explaining rare circumstances when it can be used properly. The newbie set already rights bad code on average and `goto' will only make that worse.)