views:

1560

answers:

12

I've read about a really beautiful langauge called "Ada", which seems very powerful to me, with a lot of what we call these days "safety features".

What was wrong with Ada not to make it a first-class language in industry?

I know that it has been used in mission-critical software. What I am asking about is what does not make it a good language for a wider domain. For example, C was created to be a systems language but it has an important role in the scientific world.

+20  A: 

Ada has 'made it' for what it was intended to be used for. Mainly mission critical software ... e.g: 90% of the F22 raptor's fly by wire control is written in Ada (the standard DOD programming language).

Rick J
Boing 777 too flies thanks to Ada
Davide Vosti
@RickJ- that's a good point. I guess it depends how you define made it. :-)
RichardOD
+15  A: 

In a way it has succeeded, because it has influenced other languages still in widespread use today (especially via exception handling).

It may have been overspecified, having been designed for US defense use, by a committee. It was probably ahead of its time in some respects (with the safety features) but soon became behind the times in others (not object-oriented).

In comparison, C was so low-level that it was able to replace assembly-language coding, and so simply defined that it was easy to implement a compiler, and had the "killer app" of being the foundation of Unix. This gave it momentum for widespread adoption, and meant that C++ had a ready audience for an upgrade that included some more modern features bolted onto C. That joint C/C++ dominance has meant that subsequent widely adopted languages have usually mimicked C syntax (especially Java, ECMAScript and C#).

Daniel Earwicker
Ada was not designed by a committe. There was a competitive bid process between several language design teams, and I believe a French team won. That's why one of the key concurrency concepts in the language is the "rendezvous". :-) Not downvoted because you are the only answerer so far who I didn't have to fix the capitalization of the language name on. Only because you didn't mention it, but I'll take my victories where I can find them. :-)
T.E.D.
Oh, Ada has been an OO language since the '95 revision 14 years ago too. Most of the rest of your points are pretty good though.
T.E.D.
@T.E.D. okay, so it was designed by a *small* committee :)
Daniel Earwicker
Only if you believe that any software ever developed that had more than one person on the team working on it was "designed by committe". For everyone else, Ada was designed by Jean Ichbiah. http://en.wikipedia.org/wiki/Jean_Ichbiah
T.E.D.
It's perfectly possible for a language to be designed by a committee of *one* person - see Eiffel.
Daniel Earwicker
"Rendez-vous" in french.
jldupont
Henry Ledgard, from the successful Ada team (http://cs.fit.edu/~ryan/ada/ada-hist.html) was my instructor at the uni. Sadly, I don't believe his understanding of what a useful language should be has kept up with the times. He was an easy instructor, though! One of my classmates got extra credit on an assignment that didn't even compile.
Greg D
+2  A: 

It was and is a first class language in the industries that would benefit from "safety features". It is one the most widely used languages used in Defense and mission critical systems for exactly that reason. Especially when you know that it was originally developed for the US DoD, I think it has been very successful in it's intended field.

Regarding Ada not being OO as some answers imply, this is no longer true in Ada 95.

hhafez
Good points about the safety features and OO support. Here's a nice list where Ada has been used successfully- http://www.adahome.com/Ammo/Success/.
RichardOD
+8  A: 

As someone who started of as an Ada developer, I'd have to say that the only thing that was wrong with it was timing and inertia. I still maintain that its the most elegant language I've worked with. Unfortunately there weren't many good or high profile compilers for PCs so Ada development was (from my experience) carried out on expensive Sun workstations. This doesn't lend itself to hobbyist developers and the c developers were just happy to keep working away with what they knew.

Java took a lot of good ideas from Ada and then migrated them to c style syntax so that they could attract people that wanted the benefits of managed code but didn't want to learn a new Syntax.

Perhaps if Microsoft had had the vision we'd have Ada .NET instead of C# and we'd have a modern language, with a great syntax and a large business market. That could have been my development nirvana.

Mark
Microsoft did have the vision - .NET is a multi-language platform, and so anyone is free to implement Ada.NET, and indeed they have: http://asharp.martincarlisle.com/
Daniel Earwicker
They certainly had a lot more vision than sun in making .NET language independent, but they then did the same thing as sun by making the flagship language a modernised version of C (just as sun had) rather than creating a truly modern language such as Ada.
Mark
+5  A: 

When I was at uni I learnt Java and Ada. With Java you had a lot of IDEs to choose from, a whole range of books, a load of libraries and a load of frameworks.

With Ada we only seemed to have access to poor IDEs, a few books and very few frameworks, I think because of these reasons Ada didn't reach a critical mass to make it mainstream, and remains stuck in the misson critical application development sector.

I still think the coolest thing about Ada was allowing users to declare their own primitive data types (sample from Wikipedia):

type Month_Type is range 1 .. 12;

RichardOD
"I still think the coolest thing about Ada was allowing users to declare their own primitive data types "you mean like enums in C :pAlso you reasoning on why it didn't "make it" are wrong because back then (when ADA came out) IDE as we know them today did not exist nor frameworks as we know them today either. So that could not be the reason. Besides it did make it :D look at my answer and the answer of others.
hhafez
No I don't mean like enums in C. Whilst it would make sense in Ada to have an int in the range 1 to 1200, it probably wouldn't make much sense to have an enum in C with 1200 values. Additionally the time I was at university studying Ada was 1999 and 2000- I was making statements based on my observations. A language doesn't have to make it at inception. It wasn't attractive to me, that's why I became a .NET programmer. I have looked at your answer and others.
RichardOD
Enums in C aren't "primitive data types". They are essentially labels for specific *int*s.
T.E.D.
It is pointless to try and explain the difference between subtyping in Ada and enums in C to the C-infected RichardOD. However, I have to take issue with your characterization of that as something special to Ada. That kind of ability has been in place in practically the entire Wirthian spectrum of languages since Pascal (and likely earlier -- I have no direct experience with Algol to compare). Consider http://goo.gl/Fln0 for Pascal, then look at Modula-2/2+/3 and Oberon/-2.
JUST MY correct OPINION
@ttmrichter- no doubt there are many others. Thanks for pointing this out.
RichardOD
A: 

I totally agree with Rick J. Languages are designed to match specific needs. Ada because of its very strong typing (exhausting i must say), has been design for application safety and reliability.

And it has been a total success since Ada is embedded in A LOT of flight software. It's integrated in the european ARIANE rocket. It was integrated in the first ARIANE 5 launch, which ended-up tragically:

"64-bit floating point to 16-bit signed integer value caused a hardware exception (more specifically, an arithmetic overflow, as the floating point number had a value too large to be represented by a 16-bit signed integer)"

However, Ada is not to blame (I am to blame these nasty insinuations :)) . The conception and integration of an older ARIANE 4 flight software caused the disaster: the Inertial Reference System.

The Inertial Reference System (SRI 2) in charge of detecting the rocket stability, gave wrong informations to the On-Board Computer. The OBC then tried to adjust the rocket verticality by adding more power to the side of the rocket. As a result, the rocket took an angle of attack of more than 20 degrees, such angle automatically caused the engine self-destruction.

In fact, because of the exception, the SRI 2 showed diagnostic data which was misinterpreted as filght data by the OBC. The OBC tried to switch to the backup SRI (SRI 1), but this one crashed at the same moment, for the same reasons...

http://sunnyday.mit.edu/accidents/Ariane5accidentreport.html

Edited. Thanks to comments.

Roubachof
Hard to blame that crash on ADA. The real fault was using ARIANE 4 software on ARIANE 5 even though the latter is more powerful. And the ARIANE 4 software correctly destroyed the rocket as the flight profile was absolutely unsafe for an ARIANE 4.
MSalters
It's a bit fuzzy - Ada is mostly strongly typed, but there are dynamic casts which can cause exceptions. A language which is only mostly strongly typed can lull developers into assuming that it is strongly typed, and not to check the exception. If the check had been made and documented ( or even a comment that it's not needed as the A4 flight profile means that if the cast fails something else is wrong ), then it would have been known that the code's assumptions were invalid when on a different bird.
Pete Kirkham
I heard that the the problem was the runtime checks being turned off...
fortran
See also http://en.wikipedia.org/wiki/Ariane_5_Flight_501The problem wasn't a dynamic cast, the problem was a float->integer conversion. Both the input and output variables were strongly typed. And as stated, the error handling was in fact correct. A software runtime check would have found the same issue and should have triggered the same safety precuation (self-destruction)
MSalters
Downvoted, for the reason Fortran mentioned. The immediate problem was that they had an Ada runtime check turned off. Most other languages have no such runtime checks to start with. If anything, the language probably saved them a few other rocket crashes due to similar bugs in parts where they didn't turn off the checks.
T.E.D.
The problem was one of project management, I'd say: it was decided to reuse parts of the Ariane 4 software without adequate review.
David Thornley
-1: Ada didn't cause the crash.
Robert S.
A: 

Ada is a good language, but like COBOL it's never been popular with the larger public. Basic, C and Pascal used to be way more popular amongst people who wanted to learn to program. As a result, Ada compilers used to be more expensive than C, Basic or Pascal compilers, simply because less hobby-programmers would invest in this language. Actually, FORTRAN would have been less popular if it wasn't for the free FORTRAN compiler that's part of the GNU GCC compiler family. GNU even keeps Ada a bit more popular by also providing an Ada compiler. Still, these languages are less popular amongst developers than C#, C++, Pascal, Java and the many scripting languages.

Workshop Alex
How much do the commercial Ada compilers cost? I remember badly wanting one years ago, and finding that it cost $5,000. That was too much for me, even though I'm a huge fan of the language.
John Saunders
You can now get Gnat for free, which is what I wanted quite a few years ago. Frankly, I'm no longer interested in learning Ada, since most of the interesting things have appeared in other languages, and there's other interesting languages out there to learn (I'm going to learn Haskell next).
David Thornley
+3  A: 

There's nothing inherent in the language that makes it inferior to your comparison language, C. The main problem is that C reached a practically unheard of critical mass. C was already the hobbyist and systems programming language when Ada came out. By the time a sizable percentage of C users became convinced it had weaknesses, they just went out and created C++ rather than switch to Ada. The upcomming version of C++ has all kinds of goodies cribbed from Ada (eg: strongly-typed enums, proper counted loops).

There is still tons of code out there running (and being written in) Ada. It has been quite a success by its own standards. It just didn't take over the world.

C (and its sequel C++) is sort of like the World of Warcraft of computer languages. It just happened to capture lightning in a bottle. There's still lots of room for innovation in new programming languages, but if your standard of success is to become as big as C, you might as well just take all of your money to Vegas. Your odds of hitting it big are about the same.

There's an old saying in golf: If you get your tee shot close to the hole, it's skill. If you hit it in, it's luck.

T.E.D.
+10  A: 

It was used on Government Projects, and Ada Vendors charged that way

For example, when we bought Sparcworks C/C++ for the Sun, the list price was $2,000/seat. For Sparcworks Ada (which as far as I could tell was identical in features) the list price was $10,000/seat.

This dampened a lot of (non-vendor) commercial enthusiasm, coz nobody wants to be stuck with toolsets priced for the government!

Mark Harrison
A: 

Although Ada 83 was not Object Oriented, it was Object-based. So it did have support for a subset of OO features including encapsulation.

amendol
+2  A: 

Personally, I think the language is reasonable and met many of its objectives, but it failed to reach broad adoption for "marketing" reasons.

One contributing factor might have been that the name "Ada" was trademarked early on and compiler vendors were required to pass a bunch of tests before they could legally use the name.

I think could have discouraged people from tinkering with it and creating compilers. Without easy access to compilers, it didn't take off.

Jeff Moser
+2  A: 

Interestingly, Oracle PL/SQL is based on Ada, so depending on how loose your Ada defintion is, it's one of the most popular database languages in use today!

PL/SQL is based on the programming language Ada. As a result, PL/SQL uses a variant of Descriptive Intermediate Attributed Notation for Ada (DIANA), a tree-structured intermediate language.

-- PL/SQL User's Guide and Reference

Mark Harrison