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-23 17:27:49 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!cyclone.swbell.net!newsfeed1.easynews.com!easynews.com!easynews!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny03.gnilink.net.POSTED!0e8a908a!not-for-mail From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) 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> <1075405582.982776@master.nyc.kbcfp.com> <1075482385.142744@master.nyc.kbcfp.com> <1075732402.294581@master.nyc.kbcfp.com> <1075741279.952497@master.nyc.kbcfp.com> <16nu1099ekujjbpe9dqvs3noi9sdcfja6e@4ax.com> <1075817212.745748@master.nyc.kbcfp.com> <1075824683.769215@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> <1075995793.145904@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 24 Feb 2004 01:27:48 GMT NNTP-Posting-Host: 162.83.229.159 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny03.gnilink.net 1077586068 162.83.229.159 (Mon, 23 Feb 2004 20:27:48 EST) NNTP-Posting-Date: Mon, 23 Feb 2004 20:27:48 EST Xref: archiver1.google.com comp.lang.ada:5755 Date: 2004-02-24T01:27:48+00:00 List-Id: Robert I. Eachus wrote: > That may be why you keep butting your head against a brick wall. If Ada > said that in an equation like: s := Sin(1-x) + Cos(y); that the terms > had to be evaluated left to right, that would say you couldn't evaluate > Cos(y) before Sin(1-x) whether or not they were declared Pure. > > Ada does allow compilers to combine calls to Pure functions, and if that > is not okay, don't declare them Pure. But that doesn't say that Pure > functions can't have side effects. It just changes what a compiler is > allowed to do with Pure functions. I am not butting my head against a brick wall, I am butting into brick heads. (Who was it who defined teaching as the art of pounding abstract facts into concrete heads? :-) Right now, the ARM says that the operands in an expression are evaluated in arbitrary order, and I would propose that it say that operands are evaluated left-to-right. Neither of those statements gives any permission to not call a subprogram present in an expression. The section that specifies pragma Pure says that under certain circumstances, a call to a pure function may be omitted and replaced with the results of a previous call. That would remain as true in the left-to-right version as in the arbitrary order version. The concepts are entirely orthogonal.