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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d5b211b0c1ffcf3e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr1237016pbc.0.1339216252705; Fri, 08 Jun 2012 21:30:52 -0700 (PDT) Path: l9ni32003pbj.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Sat, 09 Jun 2012 00:30:49 -0400 Organization: A noiseless patient Spider Message-ID: References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> Mime-Version: 1.0 Injection-Date: Sat, 9 Jun 2012 04:30:52 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="5MNoRlpIAhOS/jy0qxZerw"; logging-data="28049"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NpMI2ENyzHHAGFvBJL7Ay" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Cancel-Lock: sha1:iL3XPiV/iDo6INenIwwJVW8zas8= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-09T00:30:49-04:00 List-Id: On 06/08/2012 05:35 PM, Jeffrey Carter wrote: > On 06/08/2012 01:48 PM, wrp wrote: >> >> 1. To begin with, I've heard it said that Ada, designed for embedded >> system building, is simply not suited to apps for a general computing >> platform. That's rather vague and I haven't seen any detailed >> justification of that claim. What would you say? > > I would say everything you've heard is wrong. Ada is a general-purpose > language that has been used successfully in every application domain. > Ada is the language of choice for S/W that must be correct. Since I want > all my S/W to be correct, I always use Ada. Examples of small Ada > applications I've written include one to choose the signature (like the > one at the end of this message), one to choose the sound to be played > next time I log in (next time it will say, "What is your favorite > color?"), and one to display a quote in a dialog window (today's is, "If > you think you got a nasty taunting this time, you ain't heard nothing > yet!"). There seems to be a theme there. > I've used GNAT to build small "Unix-like" utilities (simple to moderate processing, standard-in to standard-out filters, ...) for around 18 years. Mostly for DOS/Windows, but I used some, and created some, on Linux. Mostly just whatever I need. >> 2. I don't need tools to be free, but they have to be affordable to a >> small shop. If I'm targeting x86-64 (and possibly ARM) is GNAT the >> only compiler option I have? > > RR Software's Janus/Ada (for Windows) is reasonably priced. You might > also look at Atego. > Isn't there still ObjectAda? There's a limited free version that comes with the Barnes Ada 95 book (but not the Ada 2005 book). There is also an Ada-syntax shell (it was called Bush, but I think it was renamed). You can use the same program as a script or as compiled. > Note that most compiler are for Ada 95. Only 3 of 7 compilers I'm aware > of support the entire language in the current standard (published in > 2007). GNAT is the only compiler I'm aware of that supports features > from the next standard (hopefully published this year). > > Ada 95 is a very good language, so that might not be a concern. (Even > Ada 83 is a better language than most of the competition.) > I doubt I've ever (yet) used any 2005 features for this type of stuff. I have (long ago) had to back-port some to Ada 83 (old VAX Ada). >> 3. How about the quality and availablity of supporting tools like >> debuggers and profilers? > > One nice thing about Ada is not needing to use a debugger. But it's available - command line gdb or the GPS IDE for GNAT. (I've used it more for confirming code works as I expect than for tracking down bugs). >> 6. Size and latency are sometimes an issue. I've heard that since GNAT >> is oriented to building larger systems, the executables it produces >> are comparatively bulky. What is the situation relative to C in that >> regard? > > As I've said, everything you've heard is wrong. Equivalent programs in > Ada and C create executables of about the same size using gcc (the key > word is "equivalent"). Robert Dewar of AdaCore claims to have a > collection of equivalent Ada and C programs that produce identical > object code using gcc. These stories usually come from creating simple programs without any thought applied to actual "equivalence", or how they're built (if gcc by default uses dynamic libraries and GNAT uses static). -- --- BrianG 000 @[Google's email domain] .com