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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!c03.atl99!c01.usenetserver.com!news.usenetserver.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <4121E4B4.5080609@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request References: <49dc98cf.0408110556.18ae7df@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 17 Aug 2004 10:58:01 GMT NNTP-Posting-Host: 209.165.22.172 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1092740281 209.165.22.172 (Tue, 17 Aug 2004 03:58:01 PDT) NNTP-Posting-Date: Tue, 17 Aug 2004 03:58:01 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:2768 Date: 2004-08-17T10:58:01+00:00 List-Id: Keith H Duggar wrote: > > If I may explain. I'm a proficient C++ coder and have been > using it for scientific research coding for eight years. And > I have experience with various other languages including C > and Fortran. I think you will find that Ada is a really wonderful language for scientific programming. It has excellent support for mathematical programming. (Look at the attributes for floating point numbers, for example.) The only area I could think of it being weak in that regard is perhaps having a plethora of mathematical libraries already in existence. They do exist, but probably not in the number they do in Fortran and to my disappointment, there are not a large number of math libraries (beyond log and trig stuff) that are either part of the standard or so ingrained that they might as well be part of the standard. Still, with all the numeric types, standard attributes and other features, if you want mathematical precision, Ada can give it to you. > > "Ada was an experiment that failed. It was specified in such a way > that it's hard to get adequate performance. So a critical mass of > users and vendors never materialized. Now we see people devoting more > energy to making C/C++ safer for programming large systems." > "Failed" may be a bit of a relative term. I don't think it achieved its stated goals, but it is still used in a variety of places for its inherent advantages. It is certainly not as big a language as I think it ought to be given its merits and the ammount of money thrown at it. As for inherent inefficiency, this is largely a myth. Part of the problem was that 'Back In The Day..." Ada had a lot of new concepts that compiler writers didn't thoroughly understand. It also had lots of implied runtime checking going on that added overhead to executable code. The thing is that fundamentally, all of its structures *can* be implemented efficiently and these days, they typically are. Runtime checks *can* be turned off when you want efficiency and, for the small number of applications where it makes a difference, they typically are disabled. So the efficiency thing kind of came about because of bad initial implementations and was fueled by people looking for excuses not to use the language. Now, this is not true, but its hard to overcome the bad reputation. If you want proof by demonstration, get the free Gnat compiler and do some benchmarking with it. Its also a C compiler. Write some example code typical of what you do and clock it. Chances are, *if* you learn to use the compiler effectively (setting the optimization switches, turning off checks, etc.) you'll find it is competitive with equivalent C code. > Can any of you help me understand the details behind what he > stated? Was it difficult to write compilers that gave good > performance? Was the language specification too complex or > difficult to implement? > Back in 1983, Ada rather exceeded the capacity of existing computer hardware and strained the limits of compiler technology. Sooner or later, both caught up and these days, efficiency is hardly a concern. > Or are there simply missing features that preclude some > efficient coding idioms (does Ada have pointers?). I'm > very ignorant when it comes to Ada so please forgive these > newbie questions. > Naturally, Ada has pointers. They are called "access types". Be aware that usually when a C/C++ programmer starts talking about pointers from an efficiency standpoint, they mean as a mechanism for passing parameters to subroutines. This is because C was developed at a really primitive level. Compilers are perfectly capable of deciding that a data structure is too big to pass on the stack and will generate a reference automagically for you. No need to fuss with dereferencing pointer parameters inside your subroutines, etc. Its all done behind the scenes. *Trust* the compiler in that regard and learn to use it effectively. Ada programs typically use pointers a *lot* less than do C/C++ programs because they don't need them. However, when you want to build linked data structures or other things where pointers are needed, Ada has them. Just don't try to write C++ code in Ada syntax or you'll find it is really tough to do. MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "All reformers, however strict their social conscience, live in houses just as big as they can pay for." --Logan Pearsall Smith ======================================================================