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!news1.google.com!news.glorb.com!news.zanker.org!news.clara.net!wagner.news.clara.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 23 Sep 2004 20:23:42 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <1777528.JKnUEYTOM6@linux1.krischik.com> <1ec946d1.0409230820.455ad242@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1095967783 22327 62.49.19.209 (23 Sep 2004 19:29:43 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 23 Sep 2004 19:29:43 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:4041 Date: 2004-09-23T20:23:42+01:00 List-Id: mheaney@on2.com (Matthew Heaney) writes: > Martin Krischik wrote in message news:<1777528.JKnUEYTOM6@linux1.krischik.com>... > > > > Which shows that the "1 instantiation only" argument of Charles and > > Ada.Containers is misguided. So think I stick with the Booch Components > > even after Ada 2005. > > I haven't seen Simon's wordcount code in a while (probably not since > Simon and I met in Vienna), but I suspect we're comparing apples and > oranges here. > > Simon probably used the BC set, which stores each element with a > count. In Charles and AI-302, the container model is a little > different, and you would use a map instead, with the word as the map > key and the frequency count as the map element. Bag, actually; designed precisely for counting things (that compare "="). Not (IME) a solution to any problems I actually have in real life! If you didn't have Bags, the Map scheme is just as good (and is how the BC bag is implemented under the hood). > So it would not surprise me if the wordcount problem has slightly > fewer lines of code using the BC set than using the AI-302 map, since > in the former case you're using what is essentially a special purpose > container. > > Someone needs to make a feature-by-feature comparison of Simon's BC > solution and the AI-302 solution I just posted. Only if they really care! -- Simon Wright 100% Ada, no bugs.