gotos

Dave Jones djones at megatest.UUCP
Sat Apr 9 06:09:06 AEST 1988


in article <2556 at ttrdc.UUCP>, levy at ttrdc.UUCP (Daniel R. Levy) says:
> 
> In article <4307 at ihlpf.ATT.COM>, nevin1 at ihlpf.ATT.COM (00704a-Liber) writes:
>> In article <1988Apr5.213343.1528 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>> 
>> >And once in a long while, there is no better way.  A loooong while.
>> 
>> Agreed.  Although I feel that most of the uses of GOTO in C these days
>> occurs in the output of something like LEX and YACC, where I really don't
>> mind it.  Just as long as 'mere mortals' try to avoid using it.
> 
> I know this battle is an old chestnut, but for the record do you guys believe
> that superfluous flags and great big if-then statements are truly superior
> to the goto?


Of course not.  (I can't believe this is starting up again. [Giggle.])

For me, the hardest thing to handle is real long blocks.  You know,
the things delimited by curly braces:


  for(; foo = bar; bleep < blap)
	{
	   /* a skillion lines of code omited. */
        }

It's SO hard to figure out where the darn thing starts and where it ends.
And if their are "breaks" and "continues", yech.  When that happens,
in these long blocks, I would prefer a "done:" label at the end and
"gotos" rather than "breaks".  That way, I can at least search for the label.
Maybe we shoud start a raging argument about whether long blocks are
_considered_harmful_.  Shouldn't be much argument there.



More information about the Comp.lang.c mailing list