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,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-06 10:15:30 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: 6 Jun 2003 10:15:29 -0700 Organization: http://groups.google.com/ Message-ID: References: <6a90b886.0305262344.1d558079@posting.google.com> <3EDCBDF4.1050900@attbi.com> NNTP-Posting-Host: 128.102.146.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054919730 29847 127.0.0.1 (6 Jun 2003 17:15:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 6 Jun 2003 17:15:30 GMT Xref: archiver1.google.com comp.lang.ada:38763 Date: 2003-06-06T17:15:30+00:00 List-Id: Stephen Leake wrote in message news:... > procedure Matrix_Add > (Target : in out Matrix_Type; > Addend : in Matrix_type); > procedure "+=" (...) renames Matrix_Add; > > > A += B; > > the compiler actually does: > > C = A; > Matrix_Add (C, B); > A = C; > > I suppose you could change that rule, but that would be a bigger > change to the language, since "A += B" would no longer be identical to > "A := A + B". You seem to be going around in circles here. The whole idea was that A += B can avoid the temporary matrix and the extra copy operation. That's how it works in C++. Without that benefit, yes you might as well just use A := A + B.