Why Not Ada? 81
David M. Press asks: "Why is it that Ada 95 is not in greater use in Open Source projects? It can compile to machine code or java bytecode, it has built-in tasking (threading), it supports both the procedural and object-oriented paradigms, and it is very human-readable (based off of pascal syntax). And best of all, the GNAT project (based off of GCC) provides a fully conformant Ada 95 compiler for multiple platforms. What more can you ask for?" Good point. Is Ada just a victim of obscurity or are there real reasons not to use it?
Better question - why? (Score:1)
Re:Several reasons. (Score:1)
Re:Several reasons. (Score:1)
What, are you crazy? What on earth should I do if, say, a database connection fails because a process on another machine has failed? Either raise an exception, or just make up the record set from /dev/random?
Re:Ada is academic (Score:1)
> Almost nobody writes Ada for fun.
My point: if you enjoy programming, you'll probably find Ada extremely tiresome. Of course you can write great C and bad Ada. But I suspect many who program for kicks would enjoy writing bad C more than good Ada (providing the rest of us don't have to use it, of course!).
I don't dispute the value of an engineering approach to software, if only it was a true approach rather than the unpragmatic dogma favoured by academia or the lip service paid by industry. I certainly don't dispute it when flying (although I get nervous in those A320s).
Ade_
/
Ada is academic (Score:1)
When I did my degree, Ada was used as a teaching language for almost the entire three years (with some diversions: ML as an example of a functional language, M68k assembler to deter us from writing in assembler
Anyway, the only programming projects I really enjoyed were the C ones in the third year (C was covered almost in passing within a module seemingly provided as a concession to those in the department who claimed that graduates needed C skills for the job market). I think it's true that Ada partly suffered from a lack of bindings to other libraries, which made C projects look more interesting and versatile. (We used an Ada curses binding once...yuk.)
Since then, my old CS dept has swapped to Java as a teaching language, which has the significant advantage of being more vocational. I doubt many will miss Ada.
Ade_
/
"Nuke" Plants (Score:1)
Re:Why not ADA (Score:1)
I think that's his plan, funnel them straight down to Cedar Rapids.
The joke when he came in and switched the freshment to Ada was "How much does it cost to buy a computer science department.
Glad I got to take C...
Re:Why not ADA (Score:1)
When John Deere came in and gave the department all new PC's (with the John Deere Logo on it of course), it was questioned, "How many computers does it take to buy a Computer Science Department."
I my opinion, ADA is about as worthless as Visual Basic or Latin. Mumps was more elegant than Ada.
Re:Why not ADA (Score:1)
Re:The real reason (Score:1)
This doesn't seemed to have harmed Perl.
(Yes, I do know its spelled differently for you spelling weenies out there).
Re:Why not ADA (Score:1)
Re:Cumbersome (Score:1)
Adrian
Re:Culture (Score:1)
6 months into the project I suddenly found that the awkwardness of a strongly typed language had become an asset. I was writing code just as quickly as anything else I'd ever done, and it WORKED! I no longer had to deal with memory stomping problems or unexpected behavior because I accidentally used = instead of ==. The only problems I was dealing with were logic problems. So if the logic of my solution was correct and I correctly implemented that logic, I was done. On C and (especially) C++ projects, this phase is called integration 8-() and lasts forever. Java is much better but has its own drawbacks since it is still interpreted.
The bottom line is that we produced rock solid software in somewhat less time than we would have with C++ or its ilk. I've since been on several C++ projects and they have only strengthened my opinion. One project involved an embedded system written in C++ which could only run 26 minutes before it crashed. It was fielded since the typical runtime duration for this system was 20 minutes (only because they couldn't go longer without embarassment). A similar project written in Ada (not by me) has been working beautifully for 5+ years, but the Ada is bad crowd managed to get the new system written in a much better language with laughable results.
It is unfortunate that the free software culture shuns good software engineering practices and languages that support them. Free software is good because 1) most of it is NOT written in C++; 2) Some very talented people have made major contributions; 3) most importantly, it undergoes rigorous adhoc testing by the community at large (one of the first things to be scrapped in the commercial world is good testing, aka MS).
I don't have any solution for this, although I understand that Ada is being used to teach programming in universities more because it has been tied to government money. Maybe that will work.
Because... (Score:1)
Re:You Choose... (Score:1)
Re:Not just a girl...a rather messed up girl (Score:1)
Important Disclaimer
Warning, the following loose paraphrase reads like the "Killer the Dog" monologue in Half Baked. The author would like to publicly state that he is not baked..just feeling the effects of sublingually ingested Penguin Mints [thinkgeek.com]
The Story of Ada, as told by some file I found with my GNAT compiler
"Ada was Lord Byron's daughter. It is practically the law to mention this point in any discussion having a word with the letters 'ada' in it, whether or not the disussion is related to programming. She was his only legitimate daughter. Previously, he was married to his half-sister and had a kid or two. (I'd go re-read all this, but I don't want to log into my filesys on account of my laziness).
So anyway, he was the only legitimate daughter of this guy Byron (who left his sister and married someone else, hense her legitimate status).
She worked with Charles Babbage...she was the first programmer. (This line inserted in accordance with the Ada Detail Discussion Act). She worked alot...eventually she got some kind of digestive/respiratory problem.
They gave her drugs.
Literally, lots and lots of drugs. (Begin the freaky part...I'm not making any of this up). Using the finest "modern scientifik resoning methods" of the day, they treated her with a mixture of brandy, morphine, and heroine, and some other stuff. Needless to say, she became quite addicted to this stuff.
Also, she went insane (echo: insaaane). She believed she could communicate and do math with God. Eventually, she figured out that the drugs were messing with her, and quit cold turkey. To dull the pain of her many and various kinds of simultanious withdrawl, she took up gambling on horse racing. She died in debt.
.steady now
..
...wait for it
....
...........oh yeah....and they named a language after her."
RE: Perl...yeah...perl was named after that completely messed up kid in that hateful book: The Scarlet Letter
To the great and wise moderators: yeah, this is mad out of date, but I'm being force-fed Ada95 and have been waiting for an opportunity to vent in a public forum.
Re:Not just a girl...a rather messed up girl (Score:1)
Just answered your own question (Score:1)
Personally, I think that Ada is not particularly human-readable, just wordy (like Pascal or (IMHO) Java). Well written C or C++ is (or at least should be) quite readable (to someone who knows C and C++, of course).
Also, as others have pointed out, relatively few libraries exist for Ada (either written in Ada or bindings for C/C++ libs). Which means you have to either create a binding (hard without support from something like SWIG), write it yourself, or do without. None of which are particularly appealing to most people.
Also, Ada is rarely (if ever) taught. C, C++, and Java are the languages of choice in education and industry, so those are the ones people are going to learn. If Ada took off and everyone was doing it, people would start learning it: few people are going to learn a language they can't really use for anything. But who is going to start some big important project and do it in a language nobody knows? So it's a bit of a catch 22.
Re:Just answered your own question (Score:1)
OK, I stand corrected. However, at the colleges/universities where I have taken CS classes (University of Oregon, Oregon State, a community college in Oregon, and Johns Hopkins), they did not have any Ada classes. At JHU, C, C++, Java, Perl, Lisp, and ML are used (C++ and Java are the only ones taught in early classes, the others you just have to pick up).
I know more people who write stuff in Forth (1), Objective C (3 or 4) and PostScript (2), than Ada (0). In fact AFAIK I don't know anyone who even knows Ada.
Re:Just answered your own question (Score:1)
Fair enough.
Re:You Choose... (Score:1)
actually, if you use text_io; then you could go ahead and do:
Put_line("hello, world");
when making a function call, you can either be very clear about what you're doing with the little => (which we started calling a 'chun', after our lab TA), or you can just pass in vars in order.
---
My Thoughts On Ada (Score:1)
At my university, we teach Ada. It is a great language. It was written especially for embedded systems. To Ada, programming a VCR or a car is the same as a computer.
Ada was not written to prevent dumb errors. Ada is strongly typed. This is NOT cumbersome. Using the data type that you mean to use is just GOOD SOFTWARE ENGINEERING. You can always typecast if you want...
Ada is a powerful language. I would like to see it used more.
Why Not Ada? (Score:1)
Re:Why Not Ada? (Score:1)
laziness (Score:1)
Re:Why Ada is unpopular (Score:1)
Bzzzzt. Sorry. Not that I've ever seen. There may be shops that do that (God knows why), but the language reference manual and "official" style guides are filled with words and examples about capitalization as an aid to readability.
Ada is case-insensitive, perhaps due to this requirement. There are arguments on both sides of that issue, and I can't find myself getting passionate about either side -- this being /., no doubt others will supply this momentary lapse.
There was only one Ada horror from its requirement to be usable internationally and on older machines: "not equal" is written "/=" because some terminal on some machine didn't have a "!".
>Objects came late to Ada.
I really believe that Ada 95 failed to capture a large mindshare for no other reason than because its creators refused to use the simple word "class" and used a weird syntax of "tagged types" and so on to describe what was:
Re:Cumbersome (Score:1)
Absolutely true. They realized, to take one small example, that even though programmers should do array bounds checking, in the real world they don't. So they built that into the compiler. I've been called out in the middle of the night on a project in FORTRAN to fix what turned out to be somebody else's code running of the end of an array into where my code was running, so I'm grateful to the Ada designers for that.
>My feeling is that this philosophical influence on a language tends to lead to a more cumbersome language.
I don't know what "cumbersome" means. If it means that it's more difficult to get something out of the compiler than it is in C, I agree. But then my practice in C and C++ is often to compile and link and immediately fire up the debugger without even bothering to see if it runs, because I know it won't. By contrast, if code got out of an Ada compiler, you knew it would probably run and maybe even do the right thing when it ran.
>Indeed, Ada is a complex enough language that it took years to create a certified version of the compiler.
The word is "validated", and I don't recall it taking years.
>NOBODY wanted to use Ada.
Young military officers figured out pretty quickly that:
Re:Ada is academic (Score:1)
I was kind of hoping you'd follow up on that. I infer from the way that's said that you probably believe that an engineering approach to software isn't of much value to you.
You're certainly entitled to that opinion, if it is your opinion. But I hope I'm similarly entitled to being proud of what I believe is a more fully scoped professionalism.
I do take issue with Ada being mostly academic. My experience with it has been very much in the real world. And I think in academia, the flavor of the month is either C++ or Java.
I just escaped a C++ project at work that was being run by free spirited OO bigots from academia who had never delivered more than a few hundred lines of code on time and on budget. Needless to say, it was a disaster. I'll take professionals over amateurs every time.
This is absolutely not an Ada vs. C++ issue. It's possible to have a bad design and irresponsible practices in any language.
>And yes, it did seem verbose, cumbersome and dull - which was also what individuals became if they programmed in it for too long.
Sorry for such an obvious response, but I'd much rather have the person flying the plane I'm on be a little verbose, cumbersome, and dull.
Ada doesn't have hack nature. Almost nobody writes Ada for fun. People who write Ada usually do it for a living and usually do it in a large project. I'd almost be willing to assert that for quick hacks using Ada is a stupid idea. There are times when you need a fondue fork and times when you use an air hammer.
Re:Several reasons. (Score:1)
Ada, s/w engineering, and s/w integration (Score:1)
I first hired on with my present employer when a large project using FORTRAN was in its integration phase. At the time I hired on, the project had gone six months past the delivery date, and we finally delivered some eighteen months after that.
Being fairly perceptive, I got off that project as quickly as I could and onto a project in Ada that used a software engineering approach, with strict rules about control flow and data flow, encapsulation, and intercommunication between elements. Not that I knew much of that, or even what that was all about, at the time. I was just glad to get off that first project.
The Ada project not only delivered on time, but actually under-ran the hours allocated for integration, even when we had to separate the code into two separate processes and put it on a multi-processor system.
Since then I've worked on projects in Ada, FORTRAN, C and C++, and found that while software engineering discipline could be used on a project in any language, in general Ada seemed to support it better. Whether this was due to the language itself or whether project managers who believe in and understand software engineering happen to pick languages like Ada, I don't know.
I do know one thing: every Ada project I've been on has taken a smaller time for integration than any project I've been on in other languages. This includes one project where four different contractors developed software in three different cities, and when it all went together the first time, it ran.
I've also noticed that in other languages, particularly C++ in the wrong hands, changes made to one part of the system have a far greater tendency to break other people's code than they do in Ada.
Finally, I've noticed that some of the time savings from integration is spent at coding time cursing the compiler and the language for not letting you get away with stuff. But not all the time savings. And it's a lot easier to fix compile time errors than runtime errors.
I don't write Ada for fun. I don't think many people do. And since Ada work has dried up, I don't write it much for a living any more either. But if I had a big project with a tight schedule that we needed to make money on, I'd certainly push to use Ada on it.
Re:laziness (Score:1)
I'll bet the reason your system was set up to ding you on indentation was to make life easier for the TA who had to grade your projects.
On making post-compilation debugging easier, much of the time Ada makes it nonexistent! It's reasonable to expect that if an Ada program compiles, it runs, and runs correctly. CS students and other beginners, who show much more creativity in misunderstanding a problem than folks with more experience, may be an exception to this rule, but not by much.
Back in the day, many platforms didn't even have Ada debuggers, and while it'd be hyperbole to say we didn't miss them, we got to the end of the project without too many suicides or homicides.
Re:The real reason (Score:1)
with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.PutLine("Hello, world!"); end;
(Mis)information (Score:1)
IMHO, Ada is superior to C/C++/Java when you care _how_ the final product works.
Why? Because we're told not to! (Score:1)
Re:Several reasons. (Score:1)
Re:Several reasons. (Score:1)
2) GNAT compiles as fast as gcc. This was true but no longer.
3) Ther are group that try. SIGAda of the ACM is a good example.
4) GNAT uses much of the optimizations that gcc uses. What I have found is that is generates better code because you can express the problem better
5) I agree. This was due in my opinion to the early mandate by the DoD. There were some not so expensive compiler around like R&R. They cost in the same ball park as a pro version of a C++ compiler.
6) How about the control system for the Boeing 777? In my opinion, some companies are keeping it quiet that they are using languages like Ada because of the advantage they have.
7) (lastly) I have TOO many bad memories of trying to debug code written in C where the status returns are not checked. Or trying to do it correctly and doubling the code. The best example I can think of is the use of some of the logical operation in the POSIX standard where one line of Ada and a 3 line exception handler needed to be replaced with 4 lines of code for each term in the expression. Or how about concatinating string and overflowing the array.
Re:Several reasons. (Score:1)
Name one C++ compiler that is certified ANSI/ISO C++ compliant.
(Hint: Take a look at http://www.eds-conform.com/ValProdList.html. EDS is the company chartered by the US National Institute of Standards and Technology (NIST) for performing programming language conformance assessments.)
Re:Cumbersome (Score:1)
ANSI/MIL-STD 1815A published -- FEB 83
First 1815A validation -- APR 83
(source: http://www.adaic.org/pol-hist/history/holwg-93/8.
Re:"Nuke" Plants (Score:1)
Ada operates in at least following nuclear facilities:
Doel nuclear power plant, Belgium
Hinkley Nuclear Power Station, Somerset, England
US Dept. of Energy National Ignition Facility
Westinghouse Czech Nuclear Shutdown System
(source: http://www.seas.gwu.edu/~mfeldman/ada-project-sum
Re:Just answered your own question (Score:1)
Re:Ada is academic (Score:1)
The idea that someone would enjoy writing "bad C more than good Ada" just boggles my mind. I want my software to work, and work well, with me not having to futz around a lot to get it to that point.
Ada catches a lot of programming errors at compile time, which eliminates a whole class of errors. (BTW, the assertion is sometimes made that if a program written in Ada compiles, it'll probably work. Well, that's bogus, correct compilation of a program written in a strongly typed language simply increases the likelihood of it working more quickly because of the up-front reduction of type and interface mismatch errors.)
Once all the code compiles and links, the run-time system instantly catches additional bugs, such as out-of-range values, null pointers, array overruns, etc., similarly to the way the JVM monitors a Java program's execution. The Ada run-time simply provides more extensive checks (which of course can be disabled as needed).
The end result is that I can churn out working code very fast, code that takes full advantage of Ada's built-in object oriented constructs, generic templates, concurrency, distributed execution, and that works reliably. This way I avoid having to go back and fix badly written code again and again as I add more features and capabilities, instead I get to keep breaking new ground, which I find...enjoyable!
Marc
Re:laziness (Score:1)
Yes, pointers are more of an ordeal in Ada because pointers are a very powerful feature that are a major source of bugs. Ada attempts to flush out such bugs earlier by forcing the developer to understand what they expect to do with the pointer, specify it accordingly, and then enforce those expectations.
Re:Why Not Ada? (Score:1)
These language architects had final say over the architecture of their languages, and worked to ensure a consistent balance of features, clarity, and useability.
It would be interesting to see a list of the "too many features" that have made Ada a "bloated language".
Packages (comparable to namespaces)?
Generics (templates)?
Tasking (threads)?
Object oriented constructs?
What "simple task" does it require "way too much code to perform"?
Let's compare strings:
C:
if (strcmp(str1, str2) == 0) {
}
Ada:
if str1 = str2 then
-- Do something
end if;
Re:I was taught ADA (Score:1)
Tasking, by the way, which is Ada's fully integrated concurrency construct, has also existed in full-form since 1983. A lightweight additional construct, "protected types", was added in Ada 95.
Re:Just answered your own question (Score:1)
I know more people who write stuff in Ada (dozens) than Forth(0), Objective C(0), Postscript(0), Eiffel(0), or Smalltalk(0)
Re:Several reasons. (Score:1)
Okay. Ada Core Technology's GNAT. Implements the core language and all Annexes.
It's Open Source, get yerself a ready-to-install version for Linux from http://www.gnuada.org/alt.html and check it out!
Re:Cumbersome (Score:1)
The first actual compiler validations were for a Rolm/Data General box and a Western Digital system.
In 1984, TeleSoft released their compiler, which was a piece of crap, and DEC released theirs I believe in 1985. The DEC compiler was the first production quality compiler I know of, and the beta of that may have been available in late 1984. I worked on a team that worked with that beta version (due to non-disclosure, we had to call it "compiler X") and even in beta it blew away the TeleSoft compiler.
By 1986-7 there were several Ada compilers around for various platforms suitable for doing serious work.
Re:Cumbersome (Score:1)
Re:Just answered your own question (Score:1)
Re:Ada is academic (Score:1)
Re:A site with some information about Ada (Score:1)
http://www.AdaPower.com
http://www.AdaIC.org
http://www.acm.org/sigada
Ada job listings can be found at the AdaIC site as well as http://www.adajobs.com.
There seem to be a lot of misconceptions about Ada in this thread. Ada is a great language for both high and low level programming. The JGNAT Ada to JVM compiler is open source.
I used Ada by choice (Score:1)
Re:Why Not Ada? (Score:1)
Re:I was taught ADA (Score:1)
Much of the formality within Ada is geared towards:
1) Non-ambiguous semantics resulting in less chance of programmer induced errors.
2) "Programming in the large" - essentially programming large systems using large teams where interfaces are defined by one sub-team and used by another.
3) Ease of maintenance.
I have to assume from your comment that the "work" you do is not as part of a team, that your debugging effort is vastly more than the design effort, and that your code is never maintained, except possibly by yourself.
Re:Why not ADA (Score:1)
Are air traffic control systems a purely military thing? Ada is used most often when high reliability is required, not because it is a "complex" language, but because it is a safe language.
As people have mentioned, it is heavily used in Air Traffic Control, Aircraft, Railway Systems and so on, both military and commercial. Pretty much anywhere where peoples' lives are at stake in the event of failure.
For a more complete list check out:
http://www.seas.gwu.edu/~ mfeldman/ada-project-summary.html [gwu.edu].
Re:Ada is academic (Score:1)
AdaWorld?
"Anyway, the only programming projects I really enjoyed were the C ones in the third year"
Why? Was it because you enjoyed the challenge of discovering bugs and fixing them in C more than just writing the code in Ada and having it work first time?
Re:Culture (Score:1)
ftp://cs.nyu.edu/pub/gnat/gnat-3.12p- src.tar.gz [nyu.edu]
Re:Several reasons. (Score:1)
I guess that must be why they didn't implement exception handling in:
1) C++
2) Jave
3) Eiffel
Re:Money (Score:1)
GNAT is quite good at this. Also if you use exception handlers, Ada.Exceptions.Exception_Message on GNAT will provide you with exactly where the exception was raised, and Ada.Exceptions.Exception_Name the name of the exception.
Re:Why Ada is unpopular (Score:1)
I have no idea where you got this idea from. Ada was designed to work with the ASCII character set originally, now (Ada 95) the default is ANSI Latin-1.
"So it doesn't use many special characters, or even lower case letters."
False.
"This leads to ALL UPPER CASE PROGRAMMING, which is today considered ugly"
Most Ada code I've seen follows the conventions first used in the reference manual. For Ada 83, keywords were in lower case with identifiers in upper case, so you could end up with e.g:
if THE_LENGTH_OF_A_PIECE_OF_STRING = 12 then
Personally I found this convention to be appalling and ugly and didn't use it anyway, but it was only a convention - it was not dictated by the language which is, and always has been, case-insensitive!
In Ada 95 the convention is much better. Keywords are still lower case, but identifiers are capitalised e.g.:
if The_Length_Of_A_Piece_Of_String = 12 then
One of the good things about Ada is that all the important documentation, e.g the ISO Standard, the Annotated ISO Standard and the Quality & Style guides are all freely available. So you can get a compiler (GNAT) and a Language Reference Manual just to try it out without spending any money whatsoever! Go on - try it!
Re:The real reason (Score:1)
That's an interesting one - I've been programming in Ada for nearly 10 years and never knew that before! I'd be interested in knowing whether you can provide a reference to where this is defined.
Funnily enough, before I started using Ada I'd been using C and OCCAM for a couple of years, and OCCAM did use indentation as part of the syntax.
Re:Not just a girl...a rather messed up girl (Score:1)
"Force-fed" huh? I guess you would rather be learning how to make megabucks writing flaky code in a flaky language (like C++ or Java) than being provided with a solid grounding in Software Engineering.
It sounds like you have the wrong attitude. All you need to remember is that any good programmer can write in any language, but very few languages force you to think about what you're trying to do - especially C/C++. They just let you do what you want and then expect you to sort out the mess afterwards - with Ada, you're expected to not get into that mess in the first place.
Re:Not just a girl...a rather messed up girl (Score:1)
Interesting. You may find at some point that you will be designing ASICs and FPGAs. If you do, there is a chance that you will be doing this with VHDL. (There's quite a lot of money in this kind of thing in the UK). Should you ever be in this position, you will find that knowing Ada is a huge benefit as VHDL is heavily based on Ada.
Although I hope this makes you look at Ada in a new light, I won't be holding my breath, but I would suggest you investigate VHDL before writing off Ada.
Re:Because... (Score:1)
Not even slightly true. Ada was developed effectively as a panacea to reduce the massive costs involved in maintaining and supporting all the different languages and specialised compilers in use in the DoD at the time. So basically the intention was to make a language that would satisfy pretty much everyone. Specialised it certainly was not.
Re:Several reasons. (Score:2)
Re:Several reasons. (Score:2)
Cobol is a dead language. NOBODY wants to handle BCD numerics. They're slow, inefficient and (worst of all) unsafe. Too easy to corrupt.
Exception handling is Bad Programming. One way in, One way out. Nothing more, nothing less. If it ain't drawable as a JSD, BNF or a flow-chart, it's not a real program.
Re:Several reasons. (Score:2)
(The only exceptions are functions which allocate memory, as that involves circumstances outside of your control as a programmer.)
Let's take that example of concatenating a string, as an example. Easy! Just get the length of each string, malloc a buffer equal to the sum of the lengths, plus one, and put the strings in that. You are -guaranteed- that the buffer will never overflow, because you've coded the solution in such a way as to make that impossible.
(Fixed-length buffers are the ones that kill. Fixing anything before the fact is a good way to suffer bugs, fatal and - worse - non-fatal.)
Another classic one is the square root function. Two possibilities. First, take as a parameter an unsigned value. If it's unsigned, it can never be negative, so your function will -always- be valid. Alternatively, take a signed value and return a signed float. If the value >= 0, then it's a real solution. If it's The trick is to always define the pre-conditions and the post-conditions. If you typecast in such a way as to guarantee the pre-conditions, then you guarantee the post-conditions will also be met. Alternatively, expand both pre-conditions and post-conditions until, again, the limits of the types guarantee all conditions are met.
Re:Several reasons. (Score:2)
Raising an exception means you have TWO paths out of a routine, which is Bad Ju-Ju in programming. Making up data is the same as not initialising your variables - another form of Bad Ju-Ju.
Write Clean Code, because Clean Code is guaranteed to work. Spaghetti Code, with exceptions jumping around like a pogo stick on speed, is GUARANTEED to fail. Why? Because you can't possibly think of every possible exception. But, if your code is inherently designed to handle every possible case BY DESIGN, you don't need to care what those cases are.
Money (Score:2)
I still think there is a need for a language with strong type checking, range checks, platform independence and good bindings to the OS and GUI.
One feature that I would like to see in new compilers is better run-time diagnostics. I used to use a DEC FORTRAN compiler that produced programs that would print out useful error messages, such as "divide by zero error at line 330 in module FOO", instead of just crashing.
A site with some information about Ada (Score:2)
http://www.adahome.com/
I've not used Ada (it's on my list of things to try), but it looks like it's got a lot going for it.
I personally like protecting developers from themselves to some extent, because it results in more robust software (depending on the choice of language, no mysterious overflows or pointer problems). This is why at my job we use Java rather than C++
Roy Ward.
I was taught ADA (Score:2)
Looking back, I believe that ADA is a good language to learn for a first language. Just like being forced to take grammar and phonics in grade school. The teachers force you to speak properly during class, but you find more concise and effective communication possible when you talk with your friends using slang, vernacular, etc. You speak formally when you are trying to prove something, or be academic, but to get work done, you don't wish to be bothered with the formallities. I think that's ADAs biggest problem.
Either that or the fact that the ADA standard wasn't changed until 1995, well after other languages gained momentum and wide spread acceptance in the academic community.
Re:The real reason (Score:2)
Just in case someone missed the significance of the Python reference (which does use indentation to indicate blocking), Ada uses a variant of begin/end delimiting that should be familiar to most C/C++ programmers.
Really, what's the difference between
void foo (void)
{
if (a < b) {
c();
}
else {
d();
}
}
and
Function foo is
begin
if (a < b) then
c;
else
d;
end if;
end foo;
I've worked in C for 15 years, vs. 3 years in Ada, so I find the uncommented C cleaner for simple procedures. For complex procedures, or if the shop requires
Cumbersome (Score:2)
I worked as a civilian consultant at an Air Force base for several years. I remember that there was a fierce resistance to using Ada for many years after the US Department of Defence issued its mandate that Ada was to be used for everything unless there was a clear justification. Even though there was a clear recognition of the fact that the multitude of languages used on individual systems and weapons platforms, NOBODY wanted to use Ada.
Adrian
Why not ADA (Score:2)
There are almost no professional opportunities for ADA programmers, unless you would like to work for Rockwell (no offence to those Rockwell folks, but you are the only people I know hiring ADA programmers.) Ada is almost SO strongly typed, it's almost code prohibitive; I get bogged down in the structures and not the implementation of the solution.
However, here are some links for ya'll
ADA Reference Manual [adahome.com]
a prof's home page [uni.edu]
Why Ada is unpopular (Score:2)
Several reasons. (Score:3)
Secondly, ADA compilation is slooow. This is inevitable, when you have a language that supports typing after the fact, amongst other obscure but powerful features.
Thirdly, nobody has ever really promoted ADA, other than the DOD. And what geek in their right mind would trust a super-paranoid organisation, when it's telling you that something is for your own good?
Fourthly, nobody but nobody has written a decent optimising ADA compiler. Nobody knows how! There has been almost zero research into 3.5th generation languages and how to tightly optimise the generated code.
Fifthly, until GNATS came along, many ADA compilers cost as much as the machine they were to run on. Microsoftian in the extreme! Anyone with any sense would have said no to the ADA tax. (The COBOL tax is even worse! And COBOL is an all but dead language!)
Sixthly, nothing interesting has been written in ADA, so geeks, nerds and coders have no incentive to grok it. (If someone were to port the Linux kernel to ADA, I'm sure interest in it would sky-rocket.)
Lastly, too many bad memories of lecturers who keep their brain cells in their tuna-fish sandwich, telling people that the best way to debug a program is to throw in more exceptions. Sorry, but if the program was written sensibly in the first place, there would BE no exceptions. Exception-handling is a way to write sloppily, with no understanding of what you're actually doing.
The real reason (Score:3)
That and it's named after a girl.
Things are getting better... (Score:3)
I have both Ada and C experience. Ada thrashes C for non-trivial programs. Maybe the problem is that most open source software starts out as trivial programs that scratch a programmers itch.
C++ and Ada95 are roughly equivalent. To my mind C++ suffers from its class-centric view of everything. Look at the hassles C++ has with singletons while Ada neatly solves this with the package structure.
adapower [adapower.com] is a good place to start for those interested.
You Choose... (Score:3)
-- OR --
printf("Hello, World!\n");
Ada95 source code takes up twice as much disk space as C source! All joking aside, I don't use Ada because there aren't very many library bindings for it. GNAT is a pretty good compiler, though, and Ada fixes a lot of problems inherent in C, but Ada probably just isn't used because C/C++ are the established languages of choice for programming on Unix/Linux systems (most of the OS being coded in C).
Culture (Score:4)
If you don't hate Ada and COBOL, you get shunned by hackerdom. You are allowed to code in either, but must swear loudly while doing so. People who actually choose to generally get discounted as idiots.
I'm not saying that the above is right, but only that the above is so.
GNAT (Score:4)
The Ada syntax is very similar to Pascal's, but the language is very similar to Java (especially thread support). Once you get accustomed to using the language, you notice that you can be very, very productive using it, much more than in C++. I would also say that the learning curve (minus the time to familiarize yourself with the syntax if you are coming from the C/C++ world) is pretty easy to climb, and you can be proficient at it soon.
For my compiler class, we needed to write a compiler for a (the non OO) subset of Ada95. I chose to write mine in Ada95, because we were allowed to use the GNAT lexer/parser (which was written in A95 as well). I would strongly recommend that anyone wanting to learn large scale programming or who is developing something that will be open source, should take a look at the source code [nyu.edu]. It is clearly written, well documented, easily understood, and even beautiful. It is a wonderful example of how someone should write code if the expect others to read it. It also shows just how beautiful and understandable the language is.