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.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,1042f393323e22da X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,1042f393323e22da X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,1042f393323e22da X-Google-Attributes: gid103376,public From: Steve Jones - JON Subject: Re: Any research putting c above ada? Date: 1997/04/11 Message-ID: <2senchydgk.fsf@hpodid2.eurocontrol.fr>#1/1 X-Deja-AN: 232288506 References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> Organization: Eurocontrol Experimental Centre, Bretigny-Sur-Orge, France Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.ada Date: 1997-04-11T00:00:00+00:00 List-Id: haggedk1@ulysses.jhuapl.edu (CubanPete) writes: [snip] > Come on now Phil. There is no language that produces software that > works "more right" than another. Software is either right or it is > not. Ada may have a great debugger but VMS types will argue all day > about how much better the debuger is on the VAX but I dont see tons of > UNIX folks in VMS classes. On my last project we use C and Ada, the bug count in the Ada code was over 1/3 that of the C code. And tracking down bugs in Ada is much easier, the code falls over it tells you the brief reason (eg constraint error) and the line at which the error was raised and the stack trace. You can then add exception handlers et al to secure the system. It provides in built range checking and strong typing. In C assigning to an unitialised pointer will cause either a crash or wild behaviour and never tell you, in Ada it will crash and tell you why. In Ada you can restrict the user from assigning between incompatible types, you can data hide etc etc. The bug count and cost of Ada is much less than that of C, just because some of the bugs that occur regularly in C (int a[10]; a[10] = 4; anyone ?) cannot be done in Ada. Both Ada and C can produce correct programs but IME it is easier to do in Ada, the same would go for Eiffel v C++, a HLL v a MLL presents similar advantages to a MLL over a LLL. I know C, I know Ada and various languages besides, if I was writting a quick check or hack I'd use C, if writting a large system I'd use Ada. The advantage of Ada isn't in the debugger but in the compiler, eg C: typedef int cleared_flight_level; typedef int airspeed; airspeed a = 4; cleared_flight_level cfl = 5; ... cfl = a; ... This is a silly example as why would anyone _want_ to do it. But Ada would prevent you ever doing it. It is here that the power comes in, with tools like generics and a proper tasking model, decent hardware access is included and data protection, all of these things make it harder to mess up, and easier to check, if the range of an enumeration in C is changed a switch statement will not care if the new value is not included, in Ada the compiler will fail the code. C is popular, it is quick and dirty, but I wouldn't like to trust my life to it. [snip] -- |Un Loup en France | Bully deification Party. One Party, one issue. | |------------Cat 1, Cha, Cha, Cha -- NERC offical drinking song----------| |----The above opinions rarely reflect my own and never my employers'----| |Do not add me to mailing lists violations will be billed for time. |