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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this a bug in my code or the compiler? Date: Sat, 13 Jun 2015 12:32:40 +0200 Organization: cbb software GmbH Message-ID: <12d47zawbqsu2$.fba3cmxkkrq1.dlg@40tude.net> References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> <1g33axhwakrzx.o6t14iz4jruy.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: evoS9sCOdnHjo0GRLLMU1Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:26301 Date: 2015-06-13T12:32:40+02:00 List-Id: On Sat, 13 Jun 2015 12:04:57 +0200, Georg Bauhaus wrote: > On 12.06.15 20:00, Dmitry A. Kazakov wrote: >> On Fri, 12 Jun 2015 19:25:00 +0200, G.B. wrote: >>> Foo (A) and Foo (A) -- Legal >> >> Only if A is a constant access. Illegal otherwise. > > Is there chapter and verse in the 83 LRM for this? Constant access was introduced in Ada 95, I believe. >> parallelism is a can of worms. > > ... if designed without regard to parallel evaluation/execution. > That's a matter of course, isn't it? Well, the parallelism of that kind is too low-level. There could be different approaches to the issue. One is a contract on the arguments evaluation order, which is usually proposed. It does not make much sense because the operation usually has no idea about the semantics of the actual arguments. Another approach would be properties of the operation's results influencing the order, e.g. purity. By-value vs. by-reference mode is an example of this approach. I.e. instead of stating any order, the set of possible orders would be deduced from the expressions of actual arguments. The third approach is explicit ordering syntax, e.g. some extended syntax of the keyed argument association. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de