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-01-29 10:43:58 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail From: David Starner Subject: Re: In-Out Parameters for functions User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity. (Debian GNU/Linux)) Message-Id: Newsgroups: comp.lang.ada References: <1075159458.149886@master.nyc.kbcfp.com> <1075225041.167448@master.nyc.kbcfp.com> <1075303237.975898@master.nyc.kbcfp.com> <9khh10pti0dn8gcp7f18ghptaifluj0fud@4ax.com> <1075390647.405841@master.nyc.kbcfp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 29 Jan 2004 18:43:57 GMT NNTP-Posting-Host: 12.72.182.196 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1075401837 12.72.182.196 (Thu, 29 Jan 2004 18:43:57 GMT) NNTP-Posting-Date: Thu, 29 Jan 2004 18:43:57 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:5058 Date: 2004-01-29T18:43:57+00:00 List-Id: On Thu, 29 Jan 2004 10:37:27 -0500, Hyman Rosen wrote: > It's precisely because people make mistakes that you want a > line of code to always mean the same thing. Otherwise, you > can wind up with something that has unspecified behavior but > happens to do what you want on a given platform, and then it > is liable to break with changes in compiler, or system, or > level of optimization, or being looked at funny. Why should buggy code work? If I wanted buggy code to work, I could use a programming language that has silent overflow and no array bounds checking. You can actually get away with that often. But Ada is there to help me produce correct, maintainable code. Mandating the order of evaluation doesn't make the code more maintainable, or most likely more correct. If a programmer realizes what they're doing, at the very least they can put f(x) and g(x) on separate lines to show that the order dependency. If they don't realize what they're doing, half the time g(x) + f(x) would have been the right code to use.