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: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: John F. Bode Subject: Re: C is 'better' than Ada because... Date: 1996/07/12 Message-ID: <4s4adc$l4a@ecuador.it.earthlink.net>#1/1 X-Deja-AN: 167897781 distribution: world references: <31e02c32.342948604@netline-fddi.jpl.nasa.gov> <4rr961$hdk@btmpjg.god.bel.alcatel.be> <31e180c5.430136383@netline-fddi.jpl.nasa.gov> content-type: text/plain; charset=ISO-8859-1 x-xxmessage-id: organization: Earthlink Network, Inc. mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-12T00:00:00+00:00 List-Id: In article <31E4DC46.794BDF32@mailgw.sanders.lockheed.com> Mike Roske, mroske@mailgw.sanders.lockheed.com writes: >I have to disagree a little bit here. I don't believe Ada FORCES you to >write good, clean, safe code. It just makes certain bad things more >difficult to accomplish. Having had the experience of guiding >(shepherding? ;-) ) several 'C' code writers into writing more >structured software, I can tell you that it is just as easy to write >bad, dirty, dangerous code in Ada. And we didn't really *know* it was >dirty and dangerous until the testing phase. It met all of the Ada >guidelines and STILL corrupted memory (bad pointer allocation). > True: bad code can be written in any language (I'm living proof of that). I guess "forces" was too strong a word; maybe "strongly encourages?" It *is* a lot harder to shoot yourself in the foot with Ada than it is with C, though. C was never designed to write *large* systems; reliance on text-based #include files and inability to nest procedures alone is testimony to that. It is possible to write really big software with C, but it the hassle curve rises exponentially as the size of the system increases. Just to carry the aviation analogy to ridiculous extremes, it's like trying to build a 747 with a Popular Mechanics 20-piece socket set; the basic tools are there, but they're not enough by themselves. You wind up spending all your time building the tools to build the plane, rather than building the plane itself, and there is always the danger that somebody gets one of the tools wrong and the whole thing falls apart on takeoff because somebody fastened a 3/4" bolt with a 7/8" nut. Since Ada was designed from the outset to solve large-scale system problems, it provides the necessary tools, but it takes a while to learn to use them effectively. I reject the notion that "it's just as easy to do it in C" -- I've used both, and I will swear on a stack of Gideon Bibles that no, it is *not* as easy to do it in C. Not if you expect the goddamn thing to *work* when you're finished. FWIW, Ada is not the be-all and end-all, either. Nor is C++. Neither make it very straightforward to manage huge programs, and true code reusability is still a pipe dream IMO. John F. Bode still working on an appropriate .sig...