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-04 06:54:53 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Wed, 04 Feb 2004 09:54:09 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 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> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1075906449.450394@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@carrots.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1075906449 10865 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:5225 Date: 2004-02-04T09:54:09-05:00 List-Id: David Starner wrote: >> p : Point := (x => ReadCoord, y => ReadCoord, z => ReadCoord); > > I have some pieces of code in response: > for I in 0.0 .. 1.0 step 0.25 Is this currently legal in Ada? Remember that my example is. > the fact that x may have been passed by copy or by reference. OK, I accept that there are more ambiguity issues than I have been cnsidering. I suppose you object to getting rid of those too? > In any real program, diddling with a bunch of global variables is likely > to be hard to maintain and hard to reason about. But using functions that read input is not hard to reason about. BunchOfReadings : array(1..100) of Integer := (others => ReadSensor); Someone might reasonably think that the above line of code should fill the array with sensor readings in order. You can tell him that it won't work that way, but you can hardly say that he had no right to expect that it would. > sequence points where most languages don't have them Java does, and many people are now exposed to that. The Java language refernce manual also recommends not writing code which exploits this, though, so that's one for your side. I think it's just atavistic dread from the reptillian hindbrain. > it's a loss of an optimization opportunity But it's not, except for programs which are now exhibiting unspecified behavior. If an expression has only one value regardless of execution order, then the compiler will be free to evaluate it in any order.