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!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Is this a bug in my code or the compiler? Date: Fri, 12 Jun 2015 19:25:00 +0200 Organization: A noiseless patient Spider Message-ID: References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 12 Jun 2015 17:23:44 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="29360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/g72HTVDBcR9clRxbCaUkLZRXFpGsy+DU=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> Cancel-Lock: sha1:BIUVWMKFzcdTHSmo6Gsi8nWN63w= Xref: news.eternal-september.org comp.lang.ada:26286 Date: 2015-06-12T19:25:00+02:00 List-Id: On 12.06.15 18:15, Dmitry A. Kazakov wrote: > Foo (A) and Foo (A) -- Illegal > Foo (A) and then Foo (A) -- Legal C has similar features... > P.P.S. It would become even worse with fine-grained parallelism, as Georg > keep on suggesting. Not sure to what this is referring (or how concatenation "&" necessitates the apparent omission of a call, if not a gotcha?). Query-command separation (on objects) seems far better than functions that make their side effects explicit. IIUC, SofCheck has brought tons of aliasing analysis and more to the AdaCore offerings, plus Parasail's automatically parallel loops... So, in Ada 83, when A is of an access type, Foo (A) and Foo (A) -- Legal Moreover, if B and A become pointing to the same object, Foo (A) and Foo (B) -- Legal, same effects Can a compiler detect this? --- So, you'd be asking for pure functions? Or total referential transparency?