Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!amdahl!dlb!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: gotos Message-ID: <445@goofy.megatest.UUCP> Date: 8 Apr 88 20:09:06 GMT References: <2556@ttrdc.UUCP> Organization: Megatest Corporation, San Jose, Ca Lines: 33 in article <2556@ttrdc.UUCP>, levy@ttrdc.UUCP (Daniel R. Levy) says: > > In article <4307@ihlpf.ATT.COM>, nevin1@ihlpf.ATT.COM (00704a-Liber) writes: >> In article <1988Apr5.213343.1528@utzoo.uucp> henry@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.