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,d2f0af5e440b367f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-25 19:06:02 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: proposal for new assignment operators Date: 25 Jun 2003 19:06:01 -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 1056593162 22432 127.0.0.1 (26 Jun 2003 02:06:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 Jun 2003 02:06:02 GMT Xref: archiver1.google.com comp.lang.ada:39752 Date: 2003-06-26T02:06:02+00:00 List-Id: Bill Findlay wrote in message news:... > On 25/6/03 07:23, in article > bebbba07.0306242223.1f86b3f7@posting.google.com, "Russ" > <18k11tm001@sneakemail.com> wrote: > > > One of the problems with adding these operators to Ada is that "/=" is > > already used for "not equals." So I suggested that the Ada version of > > these operators could be ":+", ":-", ":*", and ":/". I did not get > > much of a reply, but I think it's an idea worth considering, so I am > > repeating it here. > > > > These operators would be consistent with the ":=" assignment operator > > of Ada, and I don't think they conflict with any established Ada > > operator. I actually think they make *more* sense than the usual "+=" > > type operators. Consider, for example, > > > > count :+ 1 > > EulerAngles :* D2R > > > > I'm wearing my asbestos underwear, so have at it! > > Russ, you missed the point of my previous reply to this proposal. Yes, I did. > Your syntax is *in*compatible with the co-existence of the '=' operator and > the ':=' assignment symbol. In your proposal, x :? y, > for some operator ?, means: "x is assigned the value of (x ? y)". > > I now ask, what does a := b mean when a and b are Boolean? > Does it assign (a = b) to a, or does it assign b to a? Oh, now I see what you mean. You have an interesting point, but I don't think its particularly compelling. The ":=" symbol obviously should not be redefined for this special case. So the answer to your question is that a := b would assign b to a. It's not really an incompatibility; its just that "=" doesn't happen to be one of the operators that should have an in-place counterpart. It wouldn't be useful anyway. After all, none of the languages with "+=" have "===", do they?