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 23:24:38 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 23:24:37 -0700 Organization: http://groups.google.com/ Message-ID: References: <6a90b886.0305262344.1d558079@posting.google.com> <3EDCBDF4.1050900@attbi.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 1054967078 32031 127.0.0.1 (7 Jun 2003 06:24:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 7 Jun 2003 06:24:38 GMT Xref: archiver1.google.com comp.lang.ada:38779 Date: 2003-06-07T06:24:38+00:00 List-Id: Robert A Duff wrote in message news:... > 18k11tm001@sneakemail.com (Russ) writes: > > > Stephen Leake wrote in message news:... > > 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. > > This is all speculation, since Ada does not *have* a +:= operator. > It seems to me that if it did, the semantics should be identical to > any other procedure call with two parameters (one 'in out', and one > 'in'). It should *not* be similar to a *function* call, and should not > return a result. If all that were true, then of course +:= would be > exactly as efficient as Matrix_Add. I agree: "+=" would be a procedure, and "+" would be (is) a function. This brings us full circle, back to the question of aesthetics. I say that A += B is far more elegant AND readable than Matrix_Add ( Into=>A, From=>B ) If you prefer the latter abomination, I think you're nuts. Yes, "+=" is more familiar to me from C++, but note that Python uses it too, and Python is known for its readability. I say that anyone who cannot get used to "+=" (or ":+=" or whatever) is probably someone who harbors such an irrational hatred of C++ that they will reject even good ideas just because they came from from C++ (or C).