comp.lang.ada
 help / color / mirror / Atom feed
From: "Jason Smith" <jssmith@sandia.gov>
Subject: Re: What is Ada used for???
Date: 1996/10/10
Date: 1996-10-10T00:00:00+00:00	[thread overview]
Message-ID: <01bbb6e2$6385d540$23b2fd86@jssmith.csu891.sandia.gov> (raw)
In-Reply-To: AE813FAA-56A9E@206.107.67.23


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 <roehnelt@csulb.edu> wrote in article
<AE813FAA-56A9E@206.107.67.23>...
> 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
> 
> 
> 




  parent reply	other threads:[~1996-10-10  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-09  0:00 What is Ada used for??? Sean Roehnelt
1996-10-09  0:00 ` Aron Felix Gurski
1996-10-09  0:00   ` Robert Dewar
     [not found] ` <AE817A13-1E0BE@206.107.67.30>
1996-10-09  0:00   ` Michael Feldman
1996-10-21  0:00     ` Jin Xue Kuang
1996-10-15  0:00   ` Richard A. O'Keefe
1996-10-10  0:00 ` Jason Smith [this message]
1996-10-10  0:00   ` Robert S. White
1996-10-20  0:00   ` Choosing C++ instead of Ada (was What is Ada used for?) Richard Riehle
1996-10-21  0:00     ` Larry Kilgallen
1996-10-21  0:00     ` Robert Dewar
1996-10-22  0:00       ` whiting_ms@corning.com (Matt Whiting)
1996-10-22  0:00     ` Choosing C++ instead of Ada Stanley R. Allen
1996-10-24  0:00       ` William Clodius
1996-10-25  0:00         ` Poutanen Olavi
1996-10-25  0:00           ` jim hopper
1996-10-25  0:00         ` Andrew Dunstan
1996-10-25  0:00           ` John DiCamillo
1996-10-25  0:00         ` Larry Kilgallen
1996-10-26  0:00       ` Ken Garlington
1996-10-27  0:00         ` Matthew Heaney
1996-10-28  0:00           ` Thomas Kendelbacher
1996-10-31  0:00             ` Richard A. O'Keefe
1996-11-04  0:00             ` Robert Dewar
1996-10-28  0:00           ` David Emery
1996-10-28  0:00             ` Rush Kester
1996-10-30  0:00               ` Ed Falis
1996-10-30  0:00           ` David Emery
1996-10-28  0:00         ` Poutanen Olavi
1996-10-25  0:00     ` Choosing C++ instead of Ada (was What is Ada used for?) Kazimir Majorinc
1996-10-21  0:00   ` Robert B. Love 
1996-10-24  0:00     ` Richard Riehle
1996-10-10  0:00 ` What is Ada used for??? Robert S. White
1996-10-10  0:00   ` Larry Kilgallen
1996-10-25  0:00 ` Choosing C++ instead of Ada (was What is Ada used for?) Robert I. Eachus
1996-10-26  0:00 ` Choosing C++ instead of Ada Robert I. Eachus
1996-10-29  0:00 ` Jon S Anthony
1996-10-30  0:00 ` Arlene S. Felton
1996-11-04  0:00   ` nasser
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox