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,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread4.news.pas.earthlink.net.POSTED!e511c328!not-for-mail From: Charles D Hixson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219 Iceape/1.0.7 (Debian-1.0.7-2) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? References: <1169531612.200010.153120@38g2000cwa.googlegroups.com> <1169588206.234714.312650@k78g2000cwa.googlegroups.com> <1169624573.534128.172610@s48g2000cws.googlegroups.com> <4EBuh.15104$pQ3.9387@newsread4.news.pas.earthlink.net> <45bb4e53$1_4@news.bluewin.ch> In-Reply-To: <45bb4e53$1_4@news.bluewin.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 28 Jan 2007 00:55:59 GMT NNTP-Posting-Host: 66.245.56.19 X-Complaints-To: abuse@earthlink.net X-Trace: newsread4.news.pas.earthlink.net 1169945759 66.245.56.19 (Sat, 27 Jan 2007 16:55:59 PST) NNTP-Posting-Date: Sat, 27 Jan 2007 16:55:59 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news2.google.com comp.lang.ada:8638 Date: 2007-01-28T00:55:59+00:00 List-Id: Gautier wrote: > Charles D Hixson: > >> Ada is quite expressive, but it can be very clumsy when you want to >> write a flexible routine. You can do it, and you can do it with much >> greater safety, but it takes more work. >> >> Just, for instance, look at the Ada version of: >> #include >> void main() { print ("Hello", " ", "World!"); exit(0); } > > with Ada.Text_IO; > procedure pied is begin Ada.Text_IO.Put("Hello" & " " & "World!"); end; > > Is it so clumsy ? > ______________________________________________________________ > Gautier -- http://www.mysunrise.ch/users/gdm/index.htm > Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm > > NB: For a direct answer, e-mail address on the Web site! Sorry, I knew I shouldn't have used that example. (Of course, maybe it's the texts I'm looking at for Ada...). But I was intentionally NOT concatenating the strings. Perhaps if the central string were a number? or an unbounded string instead of a fixed string? Or perhaps my concerns are those of a neophyte...but I've got around 8 texts, and they all use that verbose form...Thus: with Ada.Text_IO; use Ada.Text_IO; procedure pied is begin Put("Hello "); Put(3); put("World!"); newline; end pied; I acknowledge that this vertical separation is optional ... but doesn't the put(3) need to be a separate print statement? (And now that my C is coming back to me a bit the C print statement should have been: printf("Hello, %d %s\n", 3, "World"); As shown by the silly mistake that I made in C, it's not my favorite language. But when I compare a book on expert systems written in C and one written in Ada (well, Ada83), the book in Ada is both thicker and has more pages devoted to code than the book in C, and the expert systems are approximately of equivalent power (i.e., toy systems). Well, the type size is a trifle larger, and the paper a bit thicker...so the comparison isn't quite as straightforward as I'm making it out, but basically Ada83 appears to take approx 1.5 times as many lines to do the same thing. (I didn't count the lines. It's a rough estimate. Say somewhere between 1.1 and 1.9 times as many lines.) Possibly this is a comment on the skills of the authors, but the number of extensive comparisons I've encountered is very limited. (Or maybe it's a comment on Ada83, and doesn't apply to Ada95.)