Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!hao!husc6!cmcl2!brl-adm!adm!vis!greg@bass.nosc.MIL From: greg@bass.nosc.MIL Newsgroups: comp.lang.c Subject: Re: \"C\" vrs ADA Message-ID: <8948@brl-adm.ARPA> Date: Sat, 22-Aug-87 02:09:10 EDT Article-I.D.: brl-adm.8948 Posted: Sat Aug 22 02:09:10 1987 Date-Received: Sun, 23-Aug-87 11:07:29 EDT Sender: news@brl-adm.ARPA Lines: 200 Normally when someone writes an article with errors I prefer to send them a private message and ask them to post a followup correction. However, the recent article from John Unekis, purporting to give advice, is so full of inaccuracies that I've decided to risk his terminal embarrassment and post this followup with corrections and criticism. John's article is indented, my comments are not. From: John Unekis Newsgroups: comp.lang.ada,comp.lang.c,sci.space,sci.space.shuttle Subject: Re: "C" vrs ADA Message-Id: <253@etn-rad.UUCP> Date: 18 Aug 87 18:09:26 GMT Keywords: Any suggestions? To: info-c@brl-smoke.arpa In article <1065@vu-vlsi.UUCP> harman@vu-vlsi.UUCP (Glen Harman) writes: Hello, sorry to interrupt your regularly scheduled news articles, but I didn't know where else to turn... Glen asks various questions, to which John replies: The ada language is far more than just a language. Ada includes standards for editors,compilers, and run-time symbolic debuggers. Ada is the name for a language, only. There are other standards which were developed to go with it, which have their own names. The other standards are not being very successful, so far. The C language evolved at AT&T in the process of developing the UNIX operating system. There were, beleive it or not, an A language and a B language that preceded it. C is based upon B is based upon BCPL is based upon CPL. A is also based upon BCPL, but is not an ancestor of C. Finally with the C language the original developer of the UNIX operating system (which was done on a PDP-7 microcomputer) felt that he had what he wanted. The C language was developed by Dennis Ritchie, who with Ken Thompson, the inventor of B, jointly developed Unix. Unix was originally developed on the DEC PDP-7 and PDP-9 minicomputers, but C was developed for the port to the PDP-11. It was a moderately structured language , with a syntax that was similar to the UNIX c shell (or vice versa). This is a wild notion! The C Shell was developed by Bill Joy at UC Berkeley about ten years after Unix and C were invented. As UNIX gained wide acceptance the C language became more popular. It has the advantage over FORTRAN of having structured variable types, but without the overly elaborate type checking done by a language like PASCAL. Pascal's type checking is not elaborate, and is actually simpler than C's. However, its more restrictive. Pascal checks for type compatibility by name, C by structure. C also does more automatic conversions - except for function arguments, which makes function calls fragile and dangerous (ANSI is fixing this). Each style of type checking has its advantages. Some languages provide both. It does share with Pascal the fact that each was developed by a single individual and thus represents that individuals prejudices in computer languages. Ada was also developed by a single individual, Jean Ichbiah. However, the specifications were developed by many people, so this distinction has some truth. C is now widely available outside the UNIX community and is a defacto standard with many companies. It is often the case in military/aerospace procurements that in order to generalize the request for computer hardware so as not to sole source a single vendor the government will ask for UNIX because it is the only operating system that can be had on a non-proprietary basis on a variety of computer hardware. UNIX of course brings C right along with it. C's popularity with the DOD and their vendors is no longer dependent on the popularity of Unix. In my experience with these people, most are using C with PC-DOS. Because UNIX does not handle real-time applications (such as interrupt handling) very well, and because there was no non- proprietary standard for real-time operating systems, the government(DOD) wanted to develop such a standard. Here, operating systems are confused with languages. Ada is often used under Unix; Unix has not been changed. Also, there are many realtime versions of Unix, from AT&T and others. Ada is suitable for programming realtime applications, provided that the underlying O/S, Unix or other, can support such. Also, the DOD had a problem with each branch of the service having its own non-compatible languages for software development(COBOL,JOVIAL, CMS-II,FORTRAN,C,etc.). It has been decided that the DOD will develop a standard computer language that will include standards for editors, compilers, run-time debuggers, and even operating system functions for real-time processing. This standard was named ADA, (the name of the mistress of Charles Babbage, who invented a punched card driven loom, considered to be the first computer, she was rumored to be the first person to ever write a program on punched cards- why her name is appropriate for a real-time language is a mystery). Again, the name Ada refers only to the language. This history of Ada and Charles Babbage is so off the mark it sounds like intentional satire. Here's the real story: Ada Agusta (Countess of Lovelace and daughter of Lord Byron, the poet) and Charles Babbage were lovers. Babbage did not invent the punch card controlled loom - Jacquard did that. Babbage used the idea in his design for his Analytical Engine, an early design (perhaps the first) for a mechanical computer. The construction of the Analytical Engine was never completed. It was too ambitious for the machining capabilities of the time. Ada was credited with a number of insights about the programming of such a machine, including the notion of using it for symbolic computation and reasoning, instead of just for arithmetic. (A recent biography of her suggests these ideas were actually Babbage's.) If you are interested in the military/aerospace field then ADA is definitely the language to learn. Be aware that it is a very complex language (Carnegie Mellon University is rumored to have required it for all sophomores- which resulted in flunking out half their sophomore class) and that to learn it properly you must find a DOD certified implementation which includes the editors, compilers, and debuggers as well. Ada is indeed complex relative to C or Pascal (although much simpler than PL/1). My opinion: Ada is not a good language for teaching beginners. Its constructs require lots of knowledge and experience to use correctly. I've never heard this rumor about CMU, and intend to disregard it unless I hear it from a more reliable source. If you are an experienced programmer and want to learn Ada, find a book that is well recommended, and/or a good teacher (shop carefully for these). You will want to have access to a validated Ada compiler, but special editors and debuggers are not needed. The DOD plans eventually to require ALL software to be done in ADA, but they realize that there is enormous inertia against it. Thousands of programmers must be retrained, and millions of lines of code converted. Don't expect to see ADA used very widely outside of the DOD environment. It will fail for the same reason that Pascal, Modula2, C, PL1, and others have failed - IBM is the dominant force in the commercial market(~75 percent of all commercial installations) and COBOL dominates the IBM installed base (~90 percent of IBM applications are in COBOL). Ada was designed for writing systems programs, primarily for embedded systems. It is not in competition with COBOL, nor is C. Far from failing, C has become the most popular systems programming language ever invented, and its popularity is still rising fast. Pascal was designed for teaching programming, and is widely used for this purpose at Universities. It is being pushed out by C for many programming tasks, but it has not failed in its primary purpose. My personal opinion: Pascal is much better suited for learning programming than either C or Ada. Time spent learning Pascal well is time well spent. My students who know Pascal do far better with C than the others. As long as computers remain basically Von Neuman processors, no language is going to offer any advantages in the real world to a language like COBOL. No business is going to go through the 3 to 5 years effort of retraining and converting of existing code just to satisfy the dogmatic prejudices of computer-science weenies. Note the strong prejudice expressed here. This kind of demeaning characterisation has no place on the network. The DOD is perfectly capable, however, of making contractors like Boeing, Lockheed, TRW, Eaton,etc. jump through the ADA hoop just by refusing to accept bids which do not include ADA. Therefore if you want a career in military/aerospace, go for ADA. --------------------------------------------------------------- ihnp4!wlbr!etn-rad!jru - The opinions above were mine when I thought of them, by tomorrow they may belong to someone else. No service is provided to the community by this kind of article. My sense from the style of the article is of little concern for accuracy. This is well supported by the remarkable number of errors. The mixture of facts with opinions hurts both, and the virulent prejudices serve no one. We all make these errors from time to time and to a certain extent. This particularly bad example may inspire us all to be more careful! _Greg J. Greg Davidson Virtual Infinity Systems +1 (619) 452-8059 6231 Branting St; San Diego, CA 92122 USA greg@vis.uucp ucbvax--| telesoft--| greg%vis.uucp@nosc.mil decvax--+--sdcsvax--+--vis greg%vis.uucp@sdcsvax.ucsd.edu ihnp4--| noscvax--|