On Tue, 2004-02-17 at 17:58, Andrew Suffield wrote: > On Mon, Feb 16, 2004 at 03:06:33PM +0000, Will Newton wrote: > > On Monday 16 Feb 2004 1:47 pm, Andrew Suffield wrote: > > In C you have: > > > > void shoe() > > { > > /* Do some complicated stuff */ > > if (foo == NULL) > > goto cleanup; > > /* Continue complicated stuff */ > > if (bar == 3) > > goto cleanup; > > > > cleanup: > > /* Cleanup */ > > } > > Good grief, that's *terrible* C. Don't do things like that. The > problem here is not a lack of exceptions, it's just bad code. As > usual. This practice is used very exensively in the linux kernel code, and in most cases it is very convenient, and easy to read. As long as you use gotos just for exceptions, it is okay. In all other cases I agree, it is a big fat DON'T. Greetings, Oliver
Attachment:
signature.asc
Description: This is a digitally signed message part