🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3412

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

#3412
From: Michael Cook
Date: Sat, 09 Sep 1995 23:50
17 lines
1767 bytes
>>>>> "CRV" == Christopher R Volpe <volpe@bart.crd.ge.com> writes:

 CRV> Notice how the diagnostics grow further and further away from the test
 CRV> which causes them to be produced? This is what I find difficult to
 CRV> follow. I don't know about you, but I've shot myself in the foot on more
 CRV> than one occasion as a result of having one too many or one too few
 CRV> closing braces deeply nested. I find it much easier to follow code that
 CRV> doesn't have five levels of indentation.

I agree entirely.  The argument "a program with a single return path is
simpler than a program with multiple return paths" is a specious argument.  A
program that uses short-circuiting for the error paths is generally more
maintainable.

(Followups redirected.)

Michael.
Technical Details
Message-ID: <r4busthioe.fsf@biltmore.cognex.com>
Path: arc1-ca.pugleaf.net!cognex.cognex.com!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> <4258ak$cj7@news0.rain.rg.net> <42hmj1$96o@rdsunx.crd.ge.com> <42l7s7$2id@news0.rain.rg.net> <42n1t0$18q@rdsunx.crd.ge.com> <42q53c$9v9@news0.rain.rg.net> <42q81a$s2t@rdsunx.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cognex.cognex.com!usenet
From: Michael Cook <mcook@cognex.com>
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: GOTO single exit point (was: Re: How to eliminate GOTO?)
Followup-To: comp.lang.c
Date: 09 Sep 1995 19:50:09 -0400
Organization: Cognex Corporation, Natick, Massachusetts
Sender: mcook@biltmore.cognex.com
Message-ID: <r4busthioe.fsf@biltmore.cognex.com>
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> <4258ak$cj7@news0.rain.rg.net>
 <42hmj1$96o@rdsunx.crd.ge.com> <42l7s7$2id@news0.rain.rg.net>
 <42n1t0$18q@rdsunx.crd.ge.com> <42q53c$9v9@news0.rain.rg.net>
 <42q81a$s2t@rdsunx.crd.ge.com>
NNTP-Posting-Host: biltmore.cognex.com
In-reply-to: volpe@bart.crd.ge.com's message of 8 Sep 1995 20:11:22 GMT
X-Newsreader: Gnus v5.0