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-18 03:31:20 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: += in ada Date: Sat, 18 Oct 2003 10:31:20 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <3F7316F7.219F@mail.ru> <17cd177c.0310010606.52da88f3@posting.google.com> <3F8BC74F.2CFBFF37@0.0> <1066312000.671303@master.nyc.kbcfp.com> <1066322883.139702@master.nyc.kbcfp.com> <3F8F372D.9040801@comcast.net> <1066400123.238640@master.nyc.kbcfp.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1066473080 19814 134.91.1.34 (18 Oct 2003 10:31:20 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Sat, 18 Oct 2003 10:31:20 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:1117 Date: 2003-10-18T10:31:20+00:00 List-Id: Russ <18k11tm001@sneakemail.com> wrote: : Hyman Rosen wrote in message news:<1066400123.238640@master.nyc.kbcfp.com>... :> In C++, I use these operators all the time. I :> just did a quick search through the source code we've added to :> out trading system and counted around 500 uses of augmented :> assignment operators (+=, -=, *=, /=), and yes, we actually do :> have a few cases of /=. We also have a few of those complicated :> left-hand sides that people talk about; here's one: :> :> (*fxMap)[exposure.secCurr.id().get_key()] += exposure.secExp; : : Thanks for that little dose of reality. I hope it wakes up a few : people around here (but I doubt it will). That makes 500 uses of mostly +=, -=, and *=, thanks for the data. It doesn't say, though, how many lines of code were counted. The examples provided (by Hyman and Lutz) do say something about the uses. As to reality, I am sure every one in this discussion has seen +=. But I'd guess that they are still waiting for a detailed argument about - whether +:= can be done in Ada without introducing all sorts of little problems (as seems to be the case in Python, as someone has mentioned) - whether implementing +:= is a hard problem. A detailed argument would, I guess, contain an estimate of the effort involved introducing +:= in Ada (not in some other language. SETL does have +:=, and SETL seems to have played a role during development of GNAT, and even without that, I'd not assume that Ada compiler writers are out of touch with reality because they don't see the big win of +:= ?) Have you answered the question about what should happen if during assignment something goes wrong? Do I have to make a backup copy, then? Have I missed something? Georg