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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-25 16:41:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: 25 Sep 2003 16:41:47 -0700 Organization: http://groups.google.com/ Message-ID: References: <3F67AAC6.2000906@attbi.com> <3F7024F8.1000102@crs4.it> <3F71A78A.5000701@crs4.it> NNTP-Posting-Host: 128.102.146.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1064533309 24120 127.0.0.1 (25 Sep 2003 23:41:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Sep 2003 23:41:49 GMT Xref: archiver1.google.com comp.lang.ada:42945 Date: 2003-09-25T23:41:49+00:00 List-Id: Stephen Leake wrote in message news:... > Wes Groleau writes: > > > Vinzent 'Gadget' Hoefler wrote: > > > They are not equivalent. > > > > The results are equivalent if an error does not occur. > > Russ's case is based on the false claim that the > > implementation MUST always be different. > > You (and others) missed the fact that the two names are _not_ > identical (one has an 'm' where the other has an 'n'). Which (I > suspect) was the point; repeated long names are hard to verify. Yes, that was the point. > Of course, this example would be thrown out at any real code review, > and a compiler would catch a simple misspelling. But the point > remains: > > foo.bar.blah (2).barf (anything) += 1; > > is easier to get right, and easier to review, than > > foo.bar.blah (2).barf (anything) := > foo.bar.blah (2).barf (anything) + 1; That's right, and other even better examples could be found, I'm sure. In fact, someone gave one on an earlier thread. It was a long nested data structure in which one of the indices was m in one case and n in the other, or something like that. > This would also be thrown out at any real code review; the recommended > approach in Ada is to use a local renames declaration to simplify the > repeated name, or to declare an Inc operator. That's true too, but I think simply using "+=" (or ":+", or "+:=") is considerably simpler and cleaner than a local renaming declaration. It's literally one line vs. four or five. > But I think we should simply acknowledge the fact that C and C++ have > a slight edge here, that we are willing to live with because of the > other consequences of trying to define and implement "+=" in Ada. Thank you for that acknowledgment. Yes, I mean it sincerely. As you might have anticipated, however, I don't agree with you about the "other consequences of trying to define and implement "+=" in Ada". As far as I am concerned, the "other consequences" are potentially improved efficiency for vector/matrix arithmetic and other applications, but as you know I've already beaten that one to death. I think it will take a friggin' nuclear device to get anyone here to budge on that one.