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: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: Patrick Logan Subject: Re: Software landmines (loops) Date: 1998/09/03 Message-ID: #1/1 X-Deja-AN: 387586825 References: <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <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> <6skhcm$1dr$2@news.indigo.ie> <6skqf3$9g0$1@hirame.wwa.com> <6smmhv$1kp$1@nnrp1.dejanews.com> Organization: Teleport - Portland's Public Access (503) 220-1016 NNTP-Posting-Date: Thu, 03 Sep 1998 12:36:57 PDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-03T00:00:00+00:00 List-Id: In comp.object sureshvv@hotmail.com wrote: : I would like to find out the costs that are associated with the se/se : structure of functions. : 1. Increases level of nesting in code, making it potentially more complex. You should procedures or methods to make loops more abstract and smaller. : 2. Requires adding flag variables which have to be tracked, making it : more complex. A flag variable can actually make a complex condition more readable by providing it with a meaningful name. : 3. Special conditions can become embedded in code rather than being readily : apparent. I'd have to see an example of this in either style in order to understand it. Nothing should be *too* hidden if the loop text is kept to a manageable size. Size is (almost) everything. Beyond that names, comments, and good, nested, formatting should make a loop's control flow and special cases apparent. Please throw your worst one at us, so we can all refactor it to our liking! (Reminds me of the revived GOTO controversy, in what? The Communications of the ACM about ten years ago or so.) -- Patrick Logan (H) mailto:plogan@teleport.com (W) mailto:patrickl@gemstone.com http://www.gemstone.com