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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no 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: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public From: smize@news.imagin.net (Samuel Mize) Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/04 Message-ID: <5pj2ot$1tl4$1@prime.imagin.net>#1/1 X-Deja-AN: 254553275 References: <33957A33.1C31AB44@oma.com> <33B09D64.E7F99DA3@saguarosoft.com> <33B16CBB.417A@gdesys Organization: ImagiNet Communications Ltd, Arlington, Texas Reply-To: smize@imagin.net (Samuel Mize) 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 , 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. Sorry, this is erroneous. Ada's "in out" parameters can be passed by copy OR by reference, as appropriate for efficiency. Ada 95 provides specific rules to make the behavior a little more predictable, but pass-by-reference is certainly available for anything larger than a pointer. >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. Ada 83 compiler vendors did use this excuse, but Ada 95 brought the ACT people and some other skilled compiler vendors into the Ada domain. You can now get inexpensive Ada compilers that optimize very well -- certainly well enough for real-time flight simulators, for example (with full flight dynamics, complete cockpit and out-the-window graphics, I mean -- we're not talking Microsoft Flight Simulator here). >I find it hard to believe that there are people who advocate Ada purely on >language merits. As a language, Ada sucks. ... >Where Ada wins is in a combination of language merits... Interesting perspective. You might check out the advocacy materials at http://www.adahome.com, if you want to see why people advocate the use of Ada. Here's a quick take: I would advocate Ada for traditional or object-oriented development tasks with any of the following characteristics: * large scale (large team, or a small team for a long duration) * high reliability required * multiprocessing needed * tight real-time requirements * reusing a lot of "legacy" code When would I *not* use Ada? Well, for a graphical user interface, I wouldn't use *any* language directly, I'd use a UI tool. For some database programs you can use a "fourth-generation" language (a tool that generates the UI and the supporting query language). For logic, functional or data-flow programming, you need a specialized language. For a rule-based expert system, you'd use an expert system shell. Some people in the object-oriented world prefer other languages, but most of these haven't had/made a chance to evaluate Ada 95's tagged types yet. Certainly for a mixed object/functional development approach, Ada hammers the opposition. Note also that there are UI tools and expert system shells that use Ada as their implementation language. But I'm not arguing that you should like Ada, just that it isn't a bad choice. Preference are inarguable. Sam Mize -- Samuel Mize -- smize@imagin.net -- Team Ada (personal net account)