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: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: rogoff@sccm.Stanford.EDU (Brian Rogoff) Subject: Re: C is 'better' than Ada because... Date: 1996/07/18 Message-ID: #1/1 X-Deja-AN: 169478655 references: <31e02c32.342948604@netline-fddi.jpl.nasa.gov> organization: /u/rogoff/.organization reply-to: rogoff@sccm.stanford.edu newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-18T00:00:00+00:00 List-Id: I promised myself not to get involved in this, but hey, you only live once! Sandy McPherson writes: John F. Bode wrote: > It *is* a lot harder to shoot yourself in the foot with Ada than it is > with C, though. However, when something does go wrong, your whole leg is likely to disappear! Actually, you blew the joke. First of all, it was C++ that blows your leg off. Second, the joke on Ada was that after loading the gun and pulling the trigger, the Ada compiler tells you your foot is of the wrong type. From your statement above, I can only gather from that comment that you have not used Ada for anything significant. It depends upon which type of large system you wish to implement. Ever tried to write an operating system, or a configurable toolkit, which needs to use callbacks, in Ada? Yeuch!!! A Motif based GUI? Head for the hills! The convention being adopted in the Ada newsgroup is to refer to Ada 95 as "Ada", and to refer to the previous version of the language as "Ada 83". I assume that you are referring to Ada 83, which did not have access to procedure/function. I agree that this was a shortcoming of Ada 83, and has been corrected in Ada (95). In these areas C or C++ wins every time. Whether this is a problem of Ada as a language is disputable, as these types of systems are traditionally the stamping ground of C anyway; however as a great believer in making life easy for myself, I would stick to C/C++ in these areas. Suit yourself. There are many good reasons for using C, but the ones you mentioned no longer apply. The main advantage that C has over Ada is that the compilers are generally very reliable (because of their small size) and produce efficient machine code. If you have good PA standards and the correct tools (lint, QAC, Purify, to name but a few) you can achieve very good results with C, sometimes better than with Ada. None of those tools are necessary with Ada. 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. Ada 95 includes protected types, for a monitor-like synchronization mechanism. Ada should be better than C for most applications, but has certain weaknesses. Let's see what Ada 95 brings, or shouldn't we all be looking at Eiffel? Which weaknesses vis-a-vis C (or C++) do you have in mind? Eiffel is superb, but I think Ada 95 provides better system programming capabilities, and a hierarchical module system. Also, there is a FREE Ada 95 compiler which runs on lots of architectures. -- Brian