TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Wed, 15 Apr 1998 03:22:08 -0700
Reply-To: Mr Ada <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: "A" Willow Ware
From: Mr Ada <[log in to unmask]>
Parts/Attachments: text/plain (134 lines)
How many Team-Ada people read the Byte magazine's April article?  Here's
my put on some of the
information presented:

> Today, the most lively debate is over C/C++ (the standard for
> software development) and Java (the newest language to achieve wide
> appeal). It's no accident that Sun designed Java for high-level
> abstraction, rapid development, and code safety.

The way this is written, it makes Java sound like the only player in the
that can provide those features.  Feh!

> Java programs, on the other hand, are virtually leakproof because the
> virtual machine (JVM) manages memory, not the programmer. The JVM has
> automatic garbage collector that frees up memory not being used by
objects and
> data structures. The garbage collector eats up some CPU cycles, but it

> eliminates a huge source of bugs and crashes.

Hello.  One can have GC in Ada.

> Likewise, Java stops programs from corrupting memory by automatically
> the bounds of all array references. You can't accidentally store data
in the
> 101st element of a 100-element array, as you can in C/C++. Although
you can
> purchase tools that add bounds-checking to C/C++, they're not

Ada has been doing this since day 1.

> There are dozens of less-publicized safety features in Java. For
> another common flaw in C/C++ programs is poor error handling. It's
easy to
> write a C/C++ program that has no error handling at all. In Java, if a
> has a method that might throw an exception, a Java program must check
for the
> exception, or it simply won't compile. Of course, you can still write
> error-handling code in Java, but Java at least ensures that some error

> trapping will be there.

Ada has always had excellent Exception Handling (Stop with the

> Java also requires an explicit cast if a variable type conversion
might lose
> precision. In C/C++, you can coerce a 64-bit double-precision
> value into a 32-bit single-precision floating-point variable without
> it. Java requires an explicit cast, so you're at least aware that a

Ada has always required type casting.

> error might result. This might seem like a small thing, but an Ariane
5 rocket
> exploded after liftoff in 1996 when a similar type mismatch caused an
> that confused the inertial guidance system.

Whoa now!  This Ariane 5, as I remember (which could be incorrect), blew
up for
other reasons not related to type mismatch.  I thought it involved using
Ariane 4
code in an Ariane 5 which weren't altogether alike.  Someone correct me
if I am
wrong.  The problem was not a coding issue but a design/implementation

> Perhaps the most controversial of Java's safety features is its
> single-inheritance model, as opposed to the multiple inheritance of
> Classes can inherit methods from only one parent class, not from
> parents. Java's designers believed this would reduce complexity and
yield a
> cleaner class hierarchy.

And then there is Ada........

> C++ devotees insist on multiple inheritance. However, it's worth
noting that
> 4Java actually does allow multiple inheritance -- of interfaces, not
> implementations. A Java class can inherit the interface definitions of

> multiple parent classes (in other words, the method calls), but it
> implement those methods itself. This protects the integrity of the
child class
> if the method implementations in the parent classes change.

Here is where I am a little weak to respond back on.  It is my
understanding that
Ada is like Java in this respect.

> Java is by no means the only language to emphasize code safety.
Eiffel, an
> object-oriented language developed by Bertrand Meyer in 1988, goes
> further than Java in some ways. Eiffel requires methods to expose
> calling parameters at run time. Most other languages, including Java
> C/C++, rely on documentation for this purpose. Ada, a 1970s language
> for the U.S. Department of Defense, contains similar safeguards. But
Java is

That's it?  It makes Ada seem old and funky!

> the newest language to win broad support from tool vendors,
developers, OS
> vendors, and schools.

Too general a statement as far as I am concerned!

Thanks for allowing me to vent.

Chris Sparks