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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/04 Message-ID: X-Deja-AN: 254466535 References: <33957A33.1C31AB44@oma.com> <865898351snz@nezumi.demon.co.uk> <339ED54C.215A5F85@oma.com> <5noc8u$a8m$3@miranda.gmrc.gecm.com> <33A032AC.2D8BA85C@oma.com> <5nrn86$cvo$3@miranda.gmrc.gecm.com> <33A1CBBB.B0602EC@oma.com> <5o2uls$ku3$2@miranda.gmrc.gecm.com> <33A6ADDA.2099EEB9@oma.com> <33A7D2DE.545B@polaroid.com> <33A9338D.10BB@polaroid.com> <33B09D64.E7F99DA3@saguarosoft.com> <33B16CBB.417A@gdesystems.com> Organization: Estormza Software Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-04T00:00:00+00:00 List-Id: In article , abo@minkirri.apana.org.au (Donovan Baarda) wrote: >One of the things that can make Ada pretty inefficient is its pass by copy >mechanism. This means that 'in out' parameters have to be copied twice, >once on calling the procedure, and once again on return. I believe that it >can add extra overheads even for 'in' and 'out' parameters. For large >array parameters, this can be a killer. I think there's a misunderstanding here. The language only mandates that scalar types and access types be passed by copy, and the RM makes it clear that the implementation is free to choose the mechanism (ie by reference) for arrays and records. >The biggest problem with Ada compared to C, is the language is so complex. >The compiler writers have such a hard time just getting it to work that >they hardly get around to putting in optimisation. C is so small that >compiling it is easy, so more effort gets spent on optimization. I asked Robert Dewar, the principal developer responsible for GNAT (a free Ada compiler that targets the gcc), a similar question about Ada's putative complexity, and he responded that it wasn't the front end that was the hard part, it was the back end. So it would appear that at least one compiler vendor _does_ spend a lot of time on optimization. Also, at least a couple of other compiler vendors in the real-time market have purchased Intermetric's Ada-Magic front end, so that they too can spend their time on optimization, because they were able to buy the front end off the shelf. So again, I am confused by the comment that "compiler writers don't have time to optimize the code," because there is ample evidence to the contrary. For which compiler writers specifically is this the case? >I find it hard to believe that there are people who advocate Ada purely on >language merits. As a language, Ada sucks. It is probably better for >large projects than C, but then C is only a small step above assembler. In >just about any application you can think of, there are languages better >than Ada for the task. Having programmed in C, Fortran, and Ada, my personal experience with Ada has been quite positive. In Ada, I am able to specify records for external device I/O with a precisely defined layout, am able to write date structures that I can use for any assignable type, have multi-threading built into the language, etc, none of which I can do in C. Don't get me wrong, I like C, but my experience is that Ada is a much more expressive language, and I am much more productive as a result. Perhaps you could provide an small code example of why you think that Ada "sucks." On what specific basis are you making this statement? I ask because I am interested in learning more about C and other languages, and so maybe there is some feature that these other languages have that Ada doesn't have, that I am unaware of. One application I can think of, and which I've had a some experience with, is with real-time embedded applications. I can say that having done it both in C and Ada, my preference is for Ada. Another application is in safety-critical applications such as railroad control and air traffic control, for which Ada is very highly suited. In fact, Ada is the language of choice for such systems. (Visit the Ada home page, , for a list of many companies writing Ada software for this domain.) Another application is in information systems, for which Ada 95 and support for the Information Systems annex would seem to be a very good language. So again, I am confused about by the comment that "in any application you can think of, there are better languages than Ada," because there are applications for which Ada seems like the ideal choice. Perhaps you can list a few applications (AI?) for which there are better languages than Ada, and provide specific reasons why you feel those other languages are more suitable. I wish to improve myself as a software engineer, and would like to learn what you know about domains and applications for which Ada is not the preferred language. >Where Ada wins is in a combination of language merits, available >compilers, supporting tools, and market penetration and demand (DOD). >Mainly $$$ for programmers :-) I think the DOD would prefer you use Ada, but the DOD does not mandate Ada's use. As a contractor to the government, you are free to use whatever language you feel is most appropriate (in the context of a systems engineering analysis). That there is no mandate for the use of Ada should be interpreted to mean that Ada is a strong enough language that it doesn't require a mandate. Note too that the idea that Ada is "used for military applications only" is a myth. There many safety-critical systems - not military in any way - written in Ada. For example, the Boeing 777 is an all-Ada system. What language do you feel is better than Ada for safety-critical systems? Can you explain what features that language has that makes it so? I would like to learn what you know about safety-critical applications. Also, I'm not sure what you mean by the comment that Ada is good because it means "more money for programmers." As a consultant, my fee is the same for Ada, C, C++, Java, or whatever other language you ask me to use. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271