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 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 09:38:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: 25 Sep 2003 12:36:49 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3F650BBE.4080107@attbi.com> <3F67AAC6.2000906@attbi.com> <3F7024F8.1000102@crs4.it> <3F71A78A.5000701@crs4.it> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1064507979 1907 128.183.235.92 (25 Sep 2003 16:39:39 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 25 Sep 2003 16:39:39 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:42907 Date: 2003-09-25T16:39:39+00:00 List-Id: 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. 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; 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. 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. -- -- Stephe