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!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 24 Sep 2004 00:43:51 GMT NNTP-Posting-Host: 63.184.105.143 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1095986631 63.184.105.143 (Thu, 23 Sep 2004 17:43:51 PDT) NNTP-Posting-Date: Thu, 23 Sep 2004 17:43:51 PDT Xref: g2news1.google.com comp.lang.ada:4067 Date: 2004-09-24T00:43:51+00:00 List-Id: Randy Brukardt wrote: > "Kevin Cline" wrote in message > news:e749549b.0409211621.6f3d3723@posting.google.com... > >>As promised in the Ada popularity thread, I have taken one of the >>Charles examples and reimplemented it in C++. I used only the >>standard C++ language and libraries. The Ada/CHARLES main program >>body is 118 (non-blank) lines of code, plus an additional 40 lines of >>instantiations in eight other specification files, for a total of 158 >>lines and 9 files. > > Why were all of the files needed? For a program of this size, I would have > nested the specifications in the body. (One possible reason was the old > restriction on nesting of tagged type extensions. Ada 2005 has eliminated > this restriction, so that particular issue will go away soon.) I have implemented a word counting program in Ada that requires 64 statements in 3 files (the extra files are needed because of the current rules about extending tagged types). This is possible because of the existence of PragmARC.Word_Input. -- Jeff Carter "C++: The power, elegance and simplicity of a hand grenade." Ole-Hjalmar Kristensen 90