🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3392

Re: GOTO single exit point (was: Re: How to eliminate GOTO?)

#3392
From: Chet Small
Date: Fri, 01 Sep 1995 16:41
18 lines
1540 bytes
In article <DE6G2z.JJD@crdnns.crd.ge.com>, volpe@ausable.crd.ge.com wrote:


> I'm not saying there aren't good uses of a goto. There are. But when you see a
> goto statment, bells and whistles should go off in your head, because it's a
> source of potential trouble. The more one becomes desensitized to goto
> statements by frequent use, the less likely one is to notice bad uses, IMO.
> Therefore, I use gotos only when the alternative is less readable. This is not
> true for the general case of multiple return points.

Bravo!

   I prefer multiple return statements to multiple goto statements.  When
a person is trying to find a problem in their own or someone else's
program, a return statement signals that you do not need to follow this
chain of logic any further.  A goto statement signals that you have to
worry and find then destination.  This worry and search for the label
compounds the difficulty.
Technical Details
Message-ID: <small-0109951141310001@155.34.60.159>
Path: arc1-ca.pugleaf.net!llnews.ll.mit.edu!usenet
References: <3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!llnews.ll.mit.edu!usenet
From: small@ll.mit.edu (Chet Small)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: GOTO single exit point (was: Re: How to eliminate GOTO?)
Date: Fri, 01 Sep 1995 11:41:31 -0500
Organization: LL - Group 66
Message-ID: <small-0109951141310001@155.34.60.159>
References: <3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge.com>
X-Newsreader: Value-Added NewsWatcher 2.0b24.0+