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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews1.google.com!not-for-mail From: kevin.cline@gmail.com (Kevin Cline) Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 23 Sep 2004 02:00:34 -0700 Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 24.219.97.214 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1095930035 26818 127.0.0.1 (23 Sep 2004 09:00:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Sep 2004 09:00:35 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:3996 Date: 2004-09-23T02:00:34-07:00 List-Id: James Alan Farrell wrote in message news:... > On 21 Sep 2004 17:21:38 -0700, kevin.cline@gmail.com (Kevin Cline) > wrote: > > >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. The C++ implementation is 76 (non-blank) lines of > >code in a single file. For grins, I also wrote the program in Perl. > >That took 14 lines. > > > >Summary: > > > >Ada/Charles 158 lines, 9 files > >C++ 76 lines > >Perl 14 lines > > > >You can compare the implementations at > >http://www.geocities.com/kc0a/wordcount.html > > Just have to put my $0.02 in on this: > > Does this prove that perl is the best language? If so, perhaps we > should all switch our avionics projects over to perl. Must be it will > be easier to code and maintain, safer to fly, and run just as fast. It doesn't prove that Perl is the best language for every job. But the original thread was about Ada popularity. Relatively few people write avionics code, or any safety-critical software. I do think that a lot of projects currently being written in C++, Java, or C# could be done much more cheaply and effectively in Perl or a similar language. > > The things that make a language a "good" language are many and > complex, and are different in different circumstances. If I need a > small utility that compares lines in different text files, I find perl > much easier than Ada. On the other hand, if I have a very large > project that must always perform "correctly", I've not found a > language that can beat Ada. But large projects in Ada or C++ or Java or C# might be small or medium-sized projects in a higher-level language. If you have a project that must always perform "correctly", then you better prove it correct. Strong typing can help, but is not absolutely necessary to that effort. For the rest of us, the most important thing is to get tested code done quickly. I don't know about you, but I can write and test 14 lines of code a whole lot faster than I can write and test 80 or 160.