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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: C is 'better' than Ada because... Date: 1996/07/20 Message-ID: <4ss8ru$3d4@felix.seas.gwu.edu>#1/1 X-Deja-AN: 169262130 references: <31e02c32.342948604@netline-fddi.jpl.nasa.gov> <4s4adc$l4a@ecuador.it.earthlink.net> <31EA0B65.3EF8@wgs.estec.esa.nl> <31EF7E48.5ABE@lmtas.lmco.com> organization: George Washington University newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-20T00:00:00+00:00 List-Id: In article <31EF7E48.5ABE@lmtas.lmco.com>, Ken Garlington wrote: [quoting an earlier poster] >> The main advantage that C has over Ada is that the compilers are generally >> very reliable (because of their small size) [and responding] >Possibly - I have seen reliable Ada compilers and not-so-reliable ones. Anything you'll get these days will be at least as reliable as the typical C compiler. There is absdolutely no reason why they shouldn;t be. Sure, there were pretty rotten Ada compilers 10 years ago, but there have been rotten C compilers too. > >> and produce efficient machine code. > >Why is this an advantage of C over Ada? Ada certainly produces efficient >machine code, given a good compiler. In fact, there are examples of Ada >outperforming C with regard to efficiency. Indeed, there are documented cases of Ada outperforming hand-coded assembler, too, on embedded processors. See http://www.acm.org/sigada/education and click on "success stories". Algorithm for algorithm, Ada compilers will typically do as well as C compilers on the machine code. Sometimes a little better, sometimes worse, but generally in the same ballpark. The (once partly true) impression of clunky Ada compilers producing rotten code dies hard. > >> Tasking looks like a good idea, >> but the implementations can be weak; in fact most spacecraft control >> systems I have seen implement their own tasking mechanisms, especially >> where they have to respond to hardware interrupts. > >This has been my experience as well. However, protected records may >be a better mechanism for some of those cases where tasking wasn't >appropriate. There's also a vicious-circle effect - if system designers avoid the tasking implementation and go down to the OS or the bare iron instead, what incentive do compiler builders have to improve the tasking? The best way to get well-optimized tasking is to _use it_. Compiler (and runtime) builders set their priorities according to perceived customer need. Wouldn;t you do the same? Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) http://www.seas.gwu.edu/faculty/mfeldman ------------------------------------------------------------------------ Pork is all that money the government gives the other guys. ------------------------------------------------------------------------ WWW: http://lglwww.epfl.ch/Ada/ or http://info.acm.org/sigada/education ------------------------------------------------------------------------