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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-28 09:48:44 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 28 Feb 2004 11:48:42 -0600 Date: Sat, 28 Feb 2004 12:48:41 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions References: <1075390647.405841@master.nyc.kbcfp.com> <1075851506.238480@master.nyc.kbcfp.com> <4020C947.81A6D703@0.0> <1075907239.138068@master.nyc.kbcfp.com> <402232E9.3EE15B4B@0.0> <1075987360.225622@master.nyc.kbcfp.com> <40236C0B.E988E003@0.0> <1077634311.254581@master.nyc.kbcfp.com> <82347202.0402251405.2db2f3c5@posting.google.com> <1077747598.55635@master.nyc.kbcfp.com> <1077811251.972122@master.nyc.kbcfp.com> In-Reply-To: <1077811251.972122@master.nyc.kbcfp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.77.160 X-Trace: sv3-uarepyj7FTukG5s1Er3DZhlABQn0uK/OYrAhHh93FyVj4PmD4Ytbq0otkpf3LLWakdyS4yxjbD8xLg0!TkzQTTZKhoNczm3YzLMQkQ78kv+lUCFH/ZuUBEaWzzpQhlBHPo/lcmzIaGlQbg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:5930 Date: 2004-02-28T12:48:41-05:00 List-Id: Hyman Rosen wrote: > But unlike such things as array index violations, Ada isn't > required to tell you that your code is not agnostic about > evaluation order, and therefore such violations can lurk > undetected. No matter how hard we try, it is not always possible for a compiler to read the programmer's mind. So there will always be bugs that exist only in the author's mind. If I write: X := X + 10; But I actually intended to decrement X, the compiler can't catch that. In fact on some other day, I might write identical code and expect X to be incremented. (In fact what probably happened was that I did a sloppy cut-and-paste, but ignore that for now.) Compilers can notice suspicious code, and warn the author. For example, if I had written: X := X + 0; A good compiler might warn me that the assignment statement resulted in no code being generated, and that might lead me to find MY bug. But bugs are always a matter of definition. That is why I like the style of programming where I start with a list of requirements, and the code is expected to implement those requirements exactly. That way the judgment of whether or not something is a bug is objective, not personal. (Doesn't stop me from considering "poorly formatted output" to be a valid bug report.) -- Robert I. Eachus "The only thing necessary for the triumph of evil is for good men to do nothing." --Edmund Burke