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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-18 14:38:12 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: 18 Jun 2003 14:38:11 -0700 Organization: http://groups.google.com/ Message-ID: References: <3EECA772.4B662024@adaworks.com> <5e9b8c34.0306181050.3c4cc664@posting.google.com> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1055972292 29967 127.0.0.1 (18 Jun 2003 21:38:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 18 Jun 2003 21:38:12 GMT Xref: archiver1.google.com comp.lang.ada:39415 Date: 2003-06-18T21:38:12+00:00 List-Id: Brian.Gaffney@myrealbox.com (Brian Gaffney) wrote in message news:<5e9b8c34.0306181050.3c4cc664@posting.google.com>... > 18k11tm001@sneakemail.com (Russ) wrote in message news:... > > Preben Randhol wrote in message news:... > > > Russ wrote: > > > > If you really insist that "+=" looks too much like ":=", then I think > > > > ":+=" or some such kludge is the next best thing, but darnit that's > > > > ugly. > > > > > > Yes it is ugly the way you wrote it, but +:= isn't. Remember that > > > assignment in Ada is := so one shouldn't seperate these two signs. > > > > > > > I'm trying, but I'm still having trouble seeing "+=" being confused > > > > with ":=". > > > > > > What about /= ? The problem is that += doesn't make sense in Ada as = is > > > not the assignment syntax := is. > > > > An interesting idea just popped into my head. We've considered "+=" > > and "+:=", but what about ":+"? Check it out: > > > > count :+ 1 > > A :+ B > > var :/ 2.0 > > > > Simple, clear, only two characters, and no conflict with "/=". What do > > you think? > > Let me start by saying that I can't believe I'm adding to this thread. > I really don't see that any of this would be an improvement. > > Having said that, let me make my proposal on how to fix this 'problem' > without creating new keywords or operators: Create procedures such as > the following for the various operators and various types, along with > the existing functions. > > procedure "+" (Left : in out Integer; Right : in Integer); > > That way we could have: > > begin > I := I + 1; > I + 1; --equivalent > end; > > {BTW, would that lead to this: > procedure "+" (Right : in out Integer); --the same as i++ > ?} > > Again, let me emphasize that I'm not suggesting this should become > part of Ada! > > --Brian "+" is a function that returns the sum of its two arguments without modifying either of those arguments. How could it also be a procedure that modifies one of its arguments? You think the same symbol taking the same argument types can be used for both a procedure and a function? It's no wonder you put the word "problem" in quotes: you don't understand the problem.