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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,db5c6b2ef47d4b9e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-21 08:43:23 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Al Christians Newsgroups: comp.lang.ada Subject: Re: short-circuit control forms Date: Thu, 21 Jun 2001 08:46:33 -0700 Organization: Trillium Resources Corporation Message-ID: <3B3216D9.113A612B@easystreet.com> X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 References: <3B30F836.D700DAA3@raytheon.com> <3B312260.728686B5@boeing.com> <3B3143A2.89CC2841@easystreet.com> <3B320D90.DD4BB9B2@ftw.rsc.raytheon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:8979 Date: 2001-06-21T08:46:33-07:00 List-Id: Wes Groleau wrote: > > > If you are programming unconsciously, you are not > doing software engineering. :-) > Sure. A software engineering project shouuld give explicit consideration to all four possibilities: true & true, true & false, false & true, false & false. But when someone is trying to write and think at the same time: 'if A and ...' their mind is focused by the form of the statement into thinking about what else has to be true besides A for the action to be the right action. You can't have too many things in mind at the same time, and what happens if A is not true is easily excluded from consideration as you write that statement. The argument against automatically including the safety mechanism of 'and then' as the normal form is that it is misleading to someone trying to draw inferences about preconditions from the code. If one is doing the 'software engineering' you mention, why is one trying to draw inferences about preconditions from the code? Don't 'software engineering' projects generate 5-20 pages of documentation and related paperwork per line of code? Isn't the information about the preconditions going to be properly recorded somewhere in those documents? If code is not documentation, why does 'software engineering' mean that we have to code like it is, even to the point of worrying about the possible but completely unjustified inferences that may be drawn by some future code reader? Wouldn't the best approach be to use 'and' most in testing, so that as many exceptions as possible are detected in testing, but use 'and then' most in the delivered code, so that as few exceptions as possible are detected by the customer? Al