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 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-16 05:45:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: += in ada Date: Thu, 16 Oct 2003 12:45:04 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3F7316F7.219F@mail.ru> <49cbf610.0310070205.2937e71a@posting.google.com> <49cbf610.0310101231.2358762a@posting.google.com> <49cbf610.0310150616.3503a1c4@posting.google.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1066308304 2208 217.17.192.37 (16 Oct 2003 12:45:04 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Thu, 16 Oct 2003 12:45:04 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:970 Date: 2003-10-16T12:45:04+00:00 List-Id: * Russ wrote: > Consider the common operation of scaling a vector, for example. I > could write > > vec := vec * factor > or > vec :* factor > > The first form requires the construction of a temporary, the actual > scaling operation, then the copying back of the temporary to the > original vector. The latter, on the other hand, can be written to > avoid the construction of the temp and the copying back. Wrong! In the case of an exception, the original values need to be retained in order to keep in touch with the current Ada feelings. So any 'idem' notation or 'augmented assignment' requires a temporary copy as strong than the original form.