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,a0be06fbc0dd71f1 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: The future of Ada is at risk Date: Mon, 7 Jan 2008 20:22:27 -0600 Organization: Jacob's private Usenet server Message-ID: References: <20071229040639.f753f982.coolzone@it.dk> <1199452391.7932.27.camel@K72> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1199758955 1488 69.95.181.76 (8 Jan 2008 02:22:35 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 8 Jan 2008 02:22:35 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19265 Date: 2008-01-07T20:22:27-06:00 List-Id: "Agyaras" wrote in message news:agyaras-50CE35.10341806012008@news.inode.at... > In article <1199452391.7932.27.camel@K72>, ... > The problem for many people starts earlier. Consider these two programs:- > > -- Ada (221 chars) > with Ada.Strings.Unbounded, Ada.Text_IO.Unbounded_IO; > use Ada.Strings.Unbounded, Ada.Text_IO.Unbounded_IO; > > procedure str is > Strg: Unbounded_String := To_Unbounded_String("ergonomy"); > begin > Put_Line(Strg); > end str; Boy, that's sure a long-winded way to write this. I'd write something like this: with Ada.Text_IO; procedure Str is Strg : String := "ergonomy"; begin Ada.Text_IO.Put_Line (Strg); end Str; I didn't count the characters, but it's surely a lot shorter than the original version. Moral: Don't even think about using Unbounded_String unless you have to; the native strings of Ada are quite powerful. I've found that Unbounded_String is more work than it is worth about 80% of the time. Ada is surely wordy when that 20% comes up (especially for those of use who rarely use use clauses), but that is about the least important attribute of a programming language. Moral2: Writing C++ code in Ada is rather likely to make lousy Ada code (I'm sure the reverse is true, too.) Randy.