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: Mon, 15 Jun 2015 12:37:37 +0200 Organization: A noiseless patient Spider Message-ID: References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> <1g33axhwakrzx.o6t14iz4jruy.dlg@40tude.net> <12d47zawbqsu2$.fba3cmxkkrq1.dlg@40tude.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 15 Jun 2015 10:36:20 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="17065"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5f22mWalfCEkl2rdJIuPjVG+i6w00ICI=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <12d47zawbqsu2$.fba3cmxkkrq1.dlg@40tude.net> Cancel-Lock: sha1:+ohY6YKpf1z5DGD2PnZEaRDEGAc= Xref: news.eternal-september.org comp.lang.ada:26324 Date: 2015-06-15T12:37:37+02:00 List-Id: On 13.06.15 12:32, Dmitry A. Kazakov wrote: >>> 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. I find this ascription of low level a little too general, missing opportunities, and pessimistic. After all, processors do manage to provide even lower level parallelism internally, and while difficult to predict, the results seem logically correct. > The third approach is explicit ordering syntax, e.g. some extended syntax > of the keyed argument association. Yes. But how? "&" means "concatenation", therefore sequencing, only at the level of metaphor, not at the level of programming. For operators, consider function "+" (Left : S; Right : T) return R; where + is any infix operator. Knowing that the order of evaluation of Left and Right is not specified leads to better design: If you know it isn't, then you start fixing the interface of S and T in view of "+". To me, this looks like "normal", good O-O design principles at work, in that Left's operation does not rely on Right's internal state, and vice versa. It avoids spaghetti style design, as a consequence of no order of evaluation being specified. Conversely, if order is needed when evaluating input to "+", i.e. if a particular succession of states is needed, then this order can be established using a constant, or a renaming. So in sum, suppose the absence of an ordering stricture could be made explicit syntactically. Would it be a boon, both driving better interfaces and also an aid to understanding?