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: clodius@hotspec.lanl.gov (William Clodius) Subject: Re: C is 'better' than Ada because... Date: 1996/07/29 Message-ID: #1/1 X-Deja-AN: 170897389 sender: clodius@hotspec.lanl.gov references: <31daad10.57288085@netline-fddi.jpl.nasa.gov> followup-to: comp.lang.ada,comp.lang.c organization: Los Alamos National Laboratory newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-29T00:00:00+00:00 List-Id: In article <01bb7bf9$b89a1740$96ee6fcf@timhome2> "Tim Behrendsen" writes: Theodore E. Dennison wrote in article <31F613F3.2781E494@escmail.orl.mmc.com>... > Tim Behrendsen wrote: > > > > You have a good point. Unfortunately, your premise is wrong. Ada is in > extensive use outside of the Government. In fact it is the language of > choice wherever a software failure is liable to cause loss of life or a > very large lawsuit. Based on your post, Ada is only appropriate for mission critical ^^^^ applications, and not for other applications? Again, the question, ^^^ and I ask this respectfully, "If it's so good, why isn't it used more universally than it is?" And, if C is so bad (in many people's opinion, not mine), why is it used almost universally, despite its acknowledged, real problems? First, Dennison's post indicates that Ada is believed to be the most appropriate language for mission critical applications. That by itself says nothing whatsoever about its applicability, or lack thereof, for other applications. Second, several people in this thread have already addressed your question about why is C used far more often than Ada. The answer has typically been that this difference in useage is almost entirely due to social and historical factors, beyond the relative merits of the languages. You may or may not believe this explanation, but if you are truly respectful of those that have responded to your question you would at least recognize that they have given an answer. Ideally you would also note why you do, or do not, believe that their answer is valid. Third, while the intrinsic merits of a language are important, those merits may differ in importance from problem to problem, and must include such social and historical factors as: are there lots of programmers available that are trained in this language; how easy is it to interface to the operating system in this language; how expensive are compilers for the language; are there non-compiler tools available for the language that compensate for the language's weaknesses; how much control do I want over the details of implementing a given algorithm (Ada and C are very comparable on this point); are compilers available for all platforms of interest (the is portability practical question); etc. Most of the above (specification of the algorithm independent of system is an exception), are very much history or culture dependent: 1. It takes time to train students and there is a tendency to train them in the most popular language. 2. It takes time for an OS to be written and it is very expensive to replace it. 3. A large part of the price of a compiler is determined by cumulative sales volume. An old and popular language has less expensive compilers than a new language. 4. An older popular language will have more tools available than a newer language. 5. Many programmers will avoid pure functional languages, because of their lack of control over the implementation of an algorithm, although their semantics allows a compiler to generate more optimal code. 6. New languages take time to have wide availability. -- William B. Clodius Phone: (505)-665-9370 Los Alamos National Laboratory Email: wclodius@lanl.gov Los Alamos, NM 87545