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-14 12:59:40 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: 14 Sep 2003 12:59:39 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1063569580 6602 127.0.0.1 (14 Sep 2003 19:59:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Sep 2003 19:59:40 GMT Xref: archiver1.google.com comp.lang.ada:42489 Date: 2003-09-14T19:59:40+00:00 List-Id: Matthew Heaney wrote in message news:... > "Frank J. Lhota" writes: > > > "Matthew Heaney" wrote in message > > news:uvfrvanu3.fsf@earthlink.net... > > > 18k11tm001@sneakemail.com (Russ) writes: > > > What kind of "augmented" assignment operator did you have in mind? > > > > I'm fairly sure he means the sort of thing where instead of writing > > > > Item(Number).Inventory.Count := Item(Number).Inventory.Count + 1; > > > > you could write > > > > Item(Number).Inventory.Count +:= 1; > > Well, here's what I do in this case: > > declare > N : Integer renames Item (Number).Inventory.Count; > begin > N := N + 1; > end; The fact that you need five lines, a new scope, and a new variable to do what most programmers (C, C++, Java, Perl, and Python) can do in one simple line should tell you something. If that's what Ada programmers call "more readable," then I'll take the "less readable" code, thanks. I said in an earlier thread that augmented assignment operators should be added for addition, subtraction, multiplication, and division. They would be equivalent to the +=, -=, *=, and /= operators of C, C++, Java, Perl, and Python. Since Ada already uses /=, I suggested that :+, :-, :*, and :/ could perhaps be used. Others have suggested that the three-character combinations could be used. I think two-character combinations are preferable, but the three-character combinations would be a big step forward too.