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 12:11:53 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? [although this thread changed to something else a long time ago] Date: 25 Sep 2003 12:11:48 -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 1064517111 2667 127.0.0.1 (25 Sep 2003 19:11:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Sep 2003 19:11:51 GMT Xref: archiver1.google.com comp.lang.ada:42921 Date: 2003-09-25T19:11:51+00:00 List-Id: "Jeff C," wrote in message news:... > "Vinzent 'Gadget' Hoefler" wrote in message > news:bkubhj$5v7t7$1@ID-175126.news.uni-berlin.de... > Russ wrote: > > >just basic common sense. Let me ask you which of the following is more > >readable: > > > >lwienfowowoenfnowoqndfoowopqihjefhnowqoowldvno := > > lwienfowowoenfnowoqndfoowopqihjefhmowqoowldvno + 1 > > > >or > > > >lwienfowowoenfnowoqndfoowopqihjefhnowqoowldvno += 1 > > They are not equivalent. You are very observant. But how long did it take you to determine that the two statements are not equivalent? My point is that the second form, using augmented assignment, makes it instantly clear that one variable is being incremented. That means better readability. > One lesson learned: You really should take care of your variable's > names. :) As I said before, those variable names are obviously ridiculous, but if I had more time I could come with a reasonable example of a complicated data structure illustrating the exact same point. > > Yipes! I think you just made the point that the C++ syntax is less error > prone...Now this mis-named thread will never die. Yes, I think I *have* made the point that this particular aspect of C++ syntax is less error prone and more readable than Ada. And no, I am not claiming that C++ is less error prone than Ada overall. Of course not. Suppose I compare two football teams. One is 6-0, and it dominates the other, which is 0-6, at almost every position. Now let's say the 0-6 team happens to have a great right tackle, and the 6-0 team has a weak right tackle. Do you suppose the coach of the 6-0 team will say, "Hey, we don't need to worry about our weak right tackle because we dominate at every other position." Not if he wants to win the Super Bowl. The same principle applies here. If Ada enthusiasts are too blind to see the obvious deficiency of the lack of augmented assignment operators, then what hope is there for Ada when it has so much else going against it?