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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: "Tim Behrendsen" Subject: Re: C is 'better' than Ada because... Date: 1996/07/31 Message-ID: <01bb7ea7$b971c5e0$96ee6fcf@timhome2>#1/1 X-Deja-AN: 171338611 references: <31e02c32.342948604@netline-fddi.jpl.nasa.gov> <4rr961$hdk@btmpjg.god.bel.alcatel.be> <31e180c5.430136383@netline-fddi.jpl.nasa.gov> <4s4adc$l4a@ecuador.it.earthlink.net> <31EA0B65.3EF8@wgs.estec.esa.nl> <31EF7E48.5ABE@lmtas.lmco.com> <01bb7bfc$3c5ca460$96ee6fcf@timhome2> content-type: text/plain; charset=ISO-8859-1 organization: A-SIS mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-31T00:00:00+00:00 List-Id: Robert Dewar wrote in article ... > Sandy said > > " The one big advantage C has traditionally had over other > languages is efficient compilation. The reason is that 'C' is one > of the few languages that provides concepts such as register > variables to give hints to the compiler." > > > This is incorrect. In practice the register declarations are useless to > a modern optimizing compiler, and merely represent an unuseful attempt > to intefere with choices that the compiler can make better anyway. Most > modern C compilers, including gcc, pretty much ignore register declarations > (they cannot be completely ignored, since they introduce some (rather ugly) > semantic restrictions). > > An exception to this is the extension in GNU C that allows global variabels > to be placed in registers. Here the programmer can do better than the > compiler, since the compiler does not see the whole program. Let me retract the register variable thing ... that is one of the things compilers can do a halfway decent job on, and it doesn't make my point very well anyway. What's more important is the very powerful C expression syntax where I can write expressions that are easily optimized, and the ability to have very close-to-the-metal pointers. -- Tim Behrendsen (tim@airshields.com)