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-17 01:20:21 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: += in ada Date: Fri, 17 Oct 2003 08:20:20 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3F7316F7.219F@mail.ru> <17cd177c.0310010606.52da88f3@posting.google.com> <3F8BC74F.2CFBFF37@0.0> <1066312000.671303@master.nyc.kbcfp.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1066378820 7199 217.17.192.37 (17 Oct 2003 08:20:20 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Fri, 17 Oct 2003 08:20:20 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:1059 Date: 2003-10-17T08:20:20+00:00 List-Id: * Hyman Rosen wrote: > Lutz Donnerhacke wrote: >> * Russ wrote: >>>Actually, a competent programmer will define the "+" operator in terms >>>of the ":+" operator rather than vice versa, because the ":+" is >>>usually more efficient (since it has no need for temporaries and extra >>>copying). >> >> Wrong. > > That's certainly the way it's usually done in C++, > for exactly the reason stated, so a bald "wrong" is > not terribly enlightening. Augmented assigments need a temporary as well as ordinary assigments of simple expressions. So your claim about unnecessary temporaries is plain wrong.