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,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-21 00:43:55 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: += in ada Date: 21 Oct 2003 00:43:54 -0700 Organization: http://groups.google.com Message-ID: References: <1066231159.711433@master.nyc.kbcfp.com> <1066311805.222491@master.nyc.kbcfp.com> <3F8F3077.60402@comcast.net> <3F900F35.50203@comcast.net> <3F92B607.809@comcast.net> <3F937806.9080205@comcast.net> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1066722235 21657 127.0.0.1 (21 Oct 2003 07:43:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Oct 2003 07:43:55 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:1257 Date: 2003-10-21T00:43:54-07:00 List-Id: "Robert I. Eachus" wrote in message news:<3F937806.9080205@comcast.net>... > I had about decided to let this topic die a graceful death when Chad R. > Meiners wrote: > > > People that use Ada are people that feel safety and maintenance are > > important characteristics of a programming language. > > I felt this is worth repeating, if only as a epitaph to this topic. > This is what Russ kept not understanding. Add clarity and readability > and a lot of what we used to call the -ilities, and that is the debate > in a nutshell. Chad even gave a perfect riposte, to the question of > side effects. The statement x += y += 1; is perfectly legal C, and I'll > let Russ choose what is the effect, and what is the side effect. I'll tell you exactly what the effect is: a compile error. And I must say that I am a bit surprised that this is not obvious to you. "+=" would be a procedure, and my understanding of procedures in Ada is that they do *not* return a value. Let's consider either possibility for operator precedence: x += ( y += 1 ); or ( x += y ) += 1; The first grouping will not compile because the expression in parens returns no value. The second grouping will not compile because, as far as I know, a procedure cannot be an lhs (because it cannot return a reference, as in C++). Am I missing something here?