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,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!y31g2000prd.googlegroups.com!not-for-mail From: Adrian Hoe Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Tue, 1 Mar 2011 00:10:21 -0800 (PST) Organization: http://groups.google.com Message-ID: <868f4a00-925c-49e3-aafe-05b614fca129@y31g2000prd.googlegroups.com> References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <4d605cbb$0$23753$14726298@news.sunsite.dk> NNTP-Posting-Host: 115.135.195.27 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1298967022 18884 127.0.0.1 (1 Mar 2011 08:10:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Mar 2011 08:10:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y31g2000prd.googlegroups.com; posting-host=115.135.195.27; posting-account=coq9PAkAAAB2Xx46RZLFJw5dY9DVXW4- User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17663 Date: 2011-03-01T00:10:21-08:00 List-Id: On Feb 20, 8:13=A0am, "Luis P. Mendes" wrote: > Fri, 18 Feb 2011 16:20:55 -0800, Edward Fish escreveu: > > > > > > > On Feb 18, 2:52=A0pm, "Luis P. Mendes" wrote= : > >> Hi, > > >> I have two projects to work, one of them in the data mining field and > >> another regarding xml parsing. > >> I've been learning C++ (from a Python, Pascal, VB background), due to > >> it being fast (sure it depends on the implementation) and because it > >> has a lot of libraries. > > >> But I find C++ a very complex language and Ada appeals to me specially > >> for its overall safety. =A0Or maybe also because I don't like to go wi= th > >> majorities... :-) > > >> I have some questions, however, that I'd like to be answered: 1. If Ad= a > >> is more type safe and restricted than C++, how can it be significantly > >> slower? > >> Please see:http://shootout.alioth.debian.org/u64q/benchmark.php? > >> test=3Dall&lang=3Dgnat > >> where for some tests, Ada is 2x, 3x, 4x and 5x slower. For the data > >> mining field as I want to implement, speed is essential. I'll code in > >> Linux and use gcc as a compiler/linker. > > >> 2. In C++ I can use lots of libraries. I'm thinking on data > >> visualization libraries, for > >> examplehttp://www.graphviz.org/Gallery/undirected/softmaint.html. > >> I've read that Ada can use some C bindings. =A0Can I use any C library= ? > >> Some? Is it easy? > >> I don't want to drop C++ for Ada to build a project that later has to > >> be rewritten in C++ because of lack of libraries. > > >> 3. Is there any kind of fast xml stream parser library? No DOM or SAX, > >> just to read attributes. > > >> Luis > > > I'm going to answer in reverse-order. #3 - There is XMLAda; I mention i= t > > only because I've heard of it. I haven't had a need for XML, much less = a > > FAST XML parser. But consider that you might not NEED a full-blown XML > > parser if what you're doing is relatively simple: you could instead hav= e > > your type override the 'Read & 'Write attributes in the proper XML > > format and use Streams. > > > #2 - This is highly dependent on you. Some people are perfectly happy > > with a light binding, in which case it's EASY; some people want a THICK > > binding in which case it's a bit harder because you have to design an > > interface which essentially a) hides the C/C++ imports & calls, and b) > > is in the "Ada Style." To take OpenGL for example instead of a function > > taking a glenum you would subtype it out so that it takes ONLY the vali= d > > values. > > > #1 - Speed is HEAVILY dependent on the implementation. Consider, for a > > moment, sorting. A bubble-sort and a quick-sort are exactly the same in > > terms of Input/Output [on an array of discrete types], but the speeds > > are radically different. As Georg mentioned that shootout program used > > the Unbounded version of strings, and that makes manipulation thereof > > rather slow... it could likely have been done with normal strings a bit > > faster but with a bit more effort and "dancing around" the fixed nature > > of string-lengths. > > I'd like to thank everyone that answered. > For me, that have learnt (or trying to learn) some programming languages > by myself, with no graduation in this area, C++ really sound cryptic. > I always like to learn by example, and although Ada must be very well > documented, it can be not obvious for me to solve some issues. > > My main doubt is the amount of aid I can get if I embark in the Ada ship. > But I surely will give it a try. > I've read a lot about the language and seen some books. > Is it or is it not advisable for beginner like me to lear Ada from a 95 > book? I was thinking in the Ada 95: The Craft of Object-Oriented > Programming book. > Any other recommended book? The Programming in Ada 2005 seems expensive > just to try the language. > > Free resources from the Internet don't seem to include much howtos or > guides of the 2005 specification. > Or did I miss something? > > Luis I have been developing database applications using Ada and as well as web applications with AWS for some time now. I would say (with my experience), Ada is a good choice. I can't imagine it if I develop those monster program in anything else all by myself. I develop and deploy on Mac OS X. Get the John Barnes' book. It is sort like a bible of Ada. -- Adrian Hoe http://adrianhoe.com