[linux-elitists] Harmful things according to google.

Nick Moffitt nick@zork.net
Sat Jan 11 10:24:26 PST 2003

begin  Alan DuBoff  quotation:
> On Friday 10 January 2003 09:52, Nick Moffitt wrote:
> > 	Hell, all loop structures are really just syntactic sugar on
> > "goto".  Even function calls are just a goto with a stack.
> > There's nothing preventing folks from implementing the standard
> > "goto out;" as something like "throw properly_named_exception;".
> And what's the point? Just because it can be done is not a reason I
> would do it. The goto statement has a place, and there are various
> reasons to use it.  I'm not advocating to boycott it and I'm
> certainly not advocating it's usage for everything including
> function calls or other loop structures.

	The point is that it is preferrable to use named flow control
structures over raw gotos just as it is preferrable to use properly
named variables and functions.  If your language doesn't support them,
then you may be forced to use goto and choose your labels carefully.

> Some languages are lacking the proper logic loops, such as Perl is
> lacking a switch statement and I've always felt that lame, so in
> that case a goto can substitute as if/elif/else statements.

	Actually, in C the case/switch block is implemented as a raw
set of gotos!  It was this feature which allowed things such as duff's
device to work:

	(the original was down--sorry about the long URL)

A: No.
Q: Should I include quotations after my reply?


More information about the linux-elitists mailing list