in reply to Re: Re: block-based programming...
in thread block-based programming...
Gotos (and their P.C. cousins "abused exceptions") must die. They lead to poorly maintainable code that is both hard to read and trace.There's no reason they lead to poorly maintainable code. They only lead to poorly maintainable code if they are misused. But it isn't too difficult to write spaghetti code using OO and no gotos - but that isn't a reason to say that OO must die. Perhaps you should read Knuth's paper "Structured programming with Go Tos", where he shows that if used appropriately, use of gotos is fine.
Quoting from my own work, part of a C program I modified last week:
I don't think this is less maintainable than writing a loop.__close1: if (close (soc) < 0) { if (errno == EINTR) { goto __close1; } perror ("close"); exit (1); }
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: block-based programming...
by flyingmoose (Priest) on Apr 22, 2004 at 16:09 UTC | |
by tilly (Archbishop) on Apr 22, 2004 at 21:02 UTC | |
by Abigail-II (Bishop) on Apr 22, 2004 at 16:27 UTC | |
by flyingmoose (Priest) on Apr 22, 2004 at 16:42 UTC | |
by elusion (Curate) on Apr 22, 2004 at 19:24 UTC | |
by flyingmoose (Priest) on Apr 22, 2004 at 19:46 UTC |