From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public From: Andre Tibben Subject: Re: Software landmines (loops) Date: 1998/09/04 Message-ID: <35EF1276.2AF4D06B@a1.nl>#1/1 X-Deja-AN: 387740733 Content-Transfer-Encoding: 7bit References: <6renh8$ga7$1@nnrp1.dejanews.com> <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <6sgror$je8$3@news.indigo.ie> <6sh3qn$9p2$1@hirame.wwa.com> <6shbca$66c$1@news.indigo.ie> <6shhq7$lut$1@hirame.wwa.com> <6sjbso$1lk$2@news.indigo.ie> <6sjijg$36r$1@hirame.wwa.com> <35ee53d7.969574@news.erols.com> Content-Type: text/plain; charset=us-ascii Organization: Hmm. Should I put something in here? Mime-Version: 1.0 Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-04T00:00:00+00:00 List-Id: Ell wrote: > >FYI, here is the entry in the Hacker Jargon Dictionary: > > > >spaghetti code /n./ Code with a complex and tangled control structure, esp. > >one using many GOTOs, exceptions, or other `unstructured' branching > >constructs. Pejorative. The synonym `kangaroo code' has been reported, > >doubtless because such code has so many jumps in it. > > 'exit', and 'return' are not "unstructured" branching as I see it. They are unstructered in the sense that they can be placed anywhere in the enclosing function. A much more structered way to express return values would be to have a special place to specify the return value (possibly just an expression before the end) and use the 'return'or 'exit' keyword only for special cases where you do want to exit at another place. An editor could in that case use a really ugly color to make it apparent that extra care is needed when changing the code. Andre Tibben