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-20 07:27:46 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!uio.no!news01.chello.no!amsnews01.chello.com!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-text.cableinet.net.POSTED!53ab2750!not-for-mail User-Agent: Microsoft-Entourage/10.1.4.030702.0 Subject: Re: += in ada From: "(see below)" Newsgroups: comp.lang.ada 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> <1066654831.617492@master.nyc.kbcfp.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Date: Mon, 20 Oct 2003 14:27:45 GMT NNTP-Posting-Host: 82.41.184.118 X-Complaints-To: abuse@blueyonder.co.uk X-Trace: news-text.cableinet.net 1066660065 82.41.184.118 (Mon, 20 Oct 2003 15:27:45 BST) NNTP-Posting-Date: Mon, 20 Oct 2003 15:27:45 BST Organization: blueyonder (post doesn't reflect views of blueyonder) X-Received-Date: Mon, 20 Oct 2003 16:27:36 MET DST (news01.chello.no) Xref: archiver1.google.com comp.lang.ada:1200 Date: 2003-10-20T14:27:45+00:00 List-Id: On 20/10/03 14:00, in article 1066654831.617492@master.nyc.kbcfp.com, "Hyman Rosen" wrote: > It's not the whole system, for which we don't have source, > just the add-ons we ourselves have written. There's about > 70000 lines of non-header C++ code, with 500 op= uses and > about 1125 uses of ++ or --. Interesting. I grepped about 14_000 lines of my own Ada code (including specs) and found about 100 potential uses of += 1, a ratio of 1 per 140 lines of source. Hyman's ++ figures indicate a ratio of around 1 per 60 lines. I suspect that automatic incrementing in Ada for-loops accounts for a good part of the difference. Neither number indicates a pressing need for the facility in Ada. Loop convenience in C/++ is somewhat dependent on having either += or ++. Perhaps this accounts for a rather basic difference of perception. To be fairer to Russ than he is to others, however, his concern goes well beyond += 1. He wants an overloadable set of op= commands. (Possibly with predefined array-handling versions?) I think we have (sort of) an answer on the relatively minor question of the need for temporaries in scalar op=. Robert and/or "Bob", does your opinion on that differ vis-a-vis matrices (say). -- Bill