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-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!informatik.uni-bremen.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: Thu, 23 Sep 2004 11:01:18 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <11b4d.3849$d5.30042@newsb.telia.net> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1095937278 29976 134.91.1.34 (23 Sep 2004 11:01:18 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 23 Sep 2004 11:01:18 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:4006 Date: 2004-09-23T11:01:18+00:00 List-Id: Kevin Cline wrote: : begin -- Insert : Insert (Map, To_Lower (Word), 0, I, B); : declare E : Wordcount_Maps.Element_Subtype renames To_Access : (I).all; : begin : E := E + 1; : end; : end Insert; Is the intention to first store a 0 with word, and then to increment the value stored at word? : is easier to understand than the corresponding C++ code: : ++concordance[word]; Although this will require that you know how to separate the queries and commands in this abbreviation. If you are not used to how ++ and [] work in the context of maps, will this still be easy to understand? AFAIK, [] does more than one thing behind the scenes. ++ is known to be difficult to understand in that it is not clear what ++ is referring to. Here, it is not incrementing the concordance, although the operator is placed immediately before the identifier. IIRC, the K&R book talks about (), ++, *, -> at length. I guess there is a reaseon. For me this is similar to saying the APL is easy to read, which is true if you know APL. -- Georg