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=3.2 required=5.0 tests=BAYES_00,RATWARE_MS_HASH, RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,33e793a459e66944 X-Google-Attributes: gid103376,public From: "Jason Smith" Subject: Re: What is Ada used for??? Date: 1996/10/10 Message-ID: <01bbb6e2$6385d540$23b2fd86@jssmith.csu891.sandia.gov> X-Deja-AN: 188556092 references: content-type: text/plain; charset=ISO-8859-1 organization: Sandia National Laboratories mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-10-10T00:00:00+00:00 List-Id: C++ is popular in industry, but exactly why escapes me for the moment. Part of the reason, I am sure, is that it is nearly 100% compatible with C. But it also carries with it many of the problems that are inherent in C - namely, it provides little protection against mistakes made by the programmer. It takes some experience in C programming to know what I am talking about, but any C/C++ programmer can tell you that debugging a C program is no trivial task. Typical mistakes the programmer might make lead to out-of-bound array indexes, pointers which point to invalid spots in memory, and using an assignment operator ("=") when a boolean comparison was intended ("=="). You know that something is not right when you see more tools for finding memory leaks and resource leaks in C++ programs than the number of compilers on the market. C++ is more difficult to read than most languages, and this makes it difficult to maintain the code over a number of years, when significant changes must be made by people who never met the original programmer. C++ projects also tend to ship with more bugs than other languages, including Ada. The readability may adversely affect code inspections. One other BIG problem with C++ is the volatility of the standard. This is a really BIG problem when you consider code maintainance costs over a period of, say, ten years. In the few years that C++ has been around, the committee has revamped the standard 4 times. This gets everyone to market quickly, but it leaves a lot of flavors of C++ hanging around. Our knowledge of good programming practice has changed only slightly in the past five years. Why couldn't they take a little more time and come up with something that would last at least that long before it is superceded by the next version? So, we come to Ada. It is decidedly unpopular in the industry (except the DOD, where it is mandated), though I feel this is due to extremely bad marketing. Ada was designed for high reliability systems, to promote good programming practice and architecture based design philosophy. It has features that let you get close to the machine, just like C++ does, and it has built in language constructs that support multitasking, which C++ does not (they are add ons to the language, and thus non-standard between operating systems in C++). Ada uses strong type checking to prevent the programmer from doing silly, stupid things that might cause the system to crash unexpectedly. C++ encourages doing silly, stupid things - it is sometimes the only way to get things done. Ada is designed to be as easy to read as possible, and as easy to maintain as possible. The first specification for Ada was released in 1983, and the newest specification was released in 1995. That is 12 years between revisions. The next revision will not occur until sometime in the next century. You see, a lot of very bright people sat down and thought long and hard about what they really wanted the language to accomplish, and how exactly they should get it to accomplish these things. These people were, by the way, paid a lot of money to do this - Ada was not developed in someone's basement in their spare time. The result is a very clean, concise language that does just what it is advertised to be able to do. So, Ada is a stable language, unlike C++, Basic, and Pascal (Delphi), which change on average once every 18 months or so. In case you were wondering about efficiency, Ada was intended to be used in embedded systems, so it is every bit as fast as C or C++. In some cases it has proven to be significantly faster than hand coded assembly language (I am not making this up). Oh, and just to drive home that Ada is a one-language solution, Ada can compile directly into Java applets. Applets are interpreted, so the Ada code runs at the same slow speed as Java, but you can turn around and compile the same Ada code into your machine dependent applications, at C++ speeds! Let's see you do that with Java. As far as school is concerned, Ada is an excellent first language. It encourages thoughtful, measured programming and the development of truly elegant code. By the time you get out of college, if people are still using C++, you will be lucky if it looks much like the C++ of today. More likely, though, Microsoft will have pushed Visual Basic hard enough that it will be the language of choice for most programming chores. C++ has a longer development cycle and requires more specialized learning than Basic, and management is more concerned with the bottom line than anything else. I guess what I am trying to say is that it is more important to learn to program than what the language du jour is. Concentrate on structuring your thoughts and developing good programming practices and habits. Learn software architecting, evolutionary programming, and how to talk to your customer. These are more important than language anyway. But when you spend 14 hour days for three weeks cursing your microprocessor emulator for an intermittent fault - because it "can't be my C program" - and you finally realize that you are indexing memory you never allocated through an invalid array index, overwriting data at random in the process, you may wish for a fleeting moment that there was something better than C/C++. There are some very good papers comparing C++ (and other languages) and Ada. A colleague of mine recently wrote one (it is not yet published). I read it, took some time to study the language, and now I am convinced Ada is one of the better kept secrets in the industry today. Go to http://www.infoseek.com and search on the keyword "Ada," and see what you think. Some of the results are ambiguous, but most reach the startling conclusion that Ada is a better development language than C++. Sean Roehnelt wrote in article ... > I'm taking my first programming class at school, and want to know where Ada > fits in to the grand scheme of things.... > > shouldn't I be learning c++ > > isn't Ada old and outdated? > > I don't know, and my instructor hasn't been able to clearify this for me at > all. > > thanks, > sean > > >