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: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!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: Fri, 12 Jun 2015 20:11:20 +0200 Organization: cbb software GmbH Message-ID: References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.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: number.nntp.giganews.com comp.lang.ada:193597 Date: 2015-06-12T20:11:20+02:00 List-Id: On Fri, 12 Jun 2015 10:53:04 -0700 (PDT), David Botton wrote: >> That is one of the reasons why in-out's were not allowed for functions in >> Ada 83. The code is clearly erroneous because the computation order is not >> defined. Possibly Token_End is called before Token_Start! > > A programmer having to worry about order of operation in a concatenation > operation is a language flaw in my opinion. Yes, but in Ada 83 side effects in functions were frowned at. The troubles arose first with side effects used quite liberally in the standard library and by most programmers. > I can accept the issue in > evaluation order of Boolean expressions or numerics (and knew of that), > but not in non numeric types. The name suggests that short-cut logical operations were considered as a syntax sugar to save keystrokes - a replacement for nested IFs. Quickly enough it was discovered that in some contexts you cannot have IFs (e.g. in barriers) and that people disliked nested IFs anyway. But the issues of ordering and re-ordering, eager vs. lazy evaluation, aliasing, purity, atomicity are not limited to Boolean types. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de