Domain: adaic.com
Stories and comments across the archive that link to adaic.com.
Comments · 26
-
Time to replace
If the whole system is this fragile, it will be more cost-effective to select a stronger platform and development tools, and begin redesigning it now.
I hear that ADA works very well for building reliable software that doesn't exhibit surprises or unexpected behavior.
-
record layout
Too bad it's no longer compatible with the on-tape format you wrote it for!
Well Ada has representation clauses for that:
http://www.adaic.com/standards/05rm/html/RM-13-5-1.html#I4559
But then Ada programmers are even more difficult to come by
:-( . -
third incarnation.
Earlier this year Ada even went into it's third incarnation now called Ada 2005 (ok, it took a bit longer to ion out all the ruff edges from the new standart):
http://www.adaic.com/standards/05rm/html/RM-TTL.html
Martin -
Ada 2005
If someone has actually stopped caring about the evolution of Computer Science then it's you - otherwise you would have known that the newest Ada is Ada 2005 and not Ada 83. Have a look for yourself:
http://www.adaic.com/standards/05rm/html/RM-TTL.html
There is nothing Java (as a language) has what Ada 2005 hasn't got as well - but a lot what Java hasn't got but Ada does.
Martin -
Re: (So were Pascal, Modula, and Ada.)
Well at least Ada still is: http://www.praxis-his.com/sparkada and very successfull as well.
And Ada isn't dead, it just got another rejuvenation in the form of Ada 2005: http://www.adaic.com/standards/ada05.html.
So the use of past tense was not appropiate.
Martin -
Re:Assembly???Quite so, but it's still more or less a de facto standard for avionics. And for this project in particular:
http://archive.adaic.com/docs/reports/ajpo/transi
t ion-support/html/3.htm -
Re:Still can have bugs
"Take the supposed wonderful language of ADA. What databases can it talk to? What type of user interface can you construct? Can it talk HTTP or HTTPS? Can it do SOAP? Can it spawn threads or processes?"
Some of the Ada bindings available include:
GNADE (http://gnade.sourceforge.net/ supports ODBC, MySQL 3.X and 4.X, PostgreSQL and SQLite. There are also Ada bindings for Oracle.
The main cross-platform UI kit is GtkAda (https://libre2.adacore.com/GtkAda/) - it works with the glade GUI builder. There are also some Windows-specific kits, including Claw (http://www.rrsoftware.com/html/prodinf/claw/claw. htm).
Web programming is supported by Ada Web Server (https://libre2.adacore.com/aws/). It handles SOAP.
Threads and support for concurrency are part of the language standard. Processes can be spawned via expect-like packages usually available with the compiler.
See http://www.adapower.com/, http://www.adaworld.com/, http://libre.adacore.com/ and http://www.adaic.com/ for additional resources.
- Ed -
The language you which for is allready there.
Hi,
Have you ever heard of Ada? No, then read:
Easy (at wikibooks):
http://en.wikibooks.org/wiki/Ada_Programming/Types /access
Detailed (ISO/IEC 8652:1995(E)):
http://www.adaic.com/standards/rm-amend/html/RM-13 -11.html
All you wanted - especially the savety part. Still you can also use an "access all" if you need more flexibility.
The thing I like about Ada it that it comes with of lot of savety features which I can all switch off if I need to.
Martin -
Re:Skynet anyone
My first thought when I read this, having worked for the DLA/DoD and Army, was "It will cost three times what they say it will, be done 10 years late (which won't matter because it will have become obsolete 2 years from now) and run Windows XP."
My first thought when I read this, having not worked for the DoD, was that someone with brains will tell them that a WinXP setup won't cut it, and they'll replace it with a custom AdaOS on top of custom hardware costing twice again what it originally cost, never getting finished, and unmaintainable by anyone not both in the DoD now and over the age of 60.
--
I advocate the use of Ada. -
Re:C++ in embedded applications is a bad idea
Ada
Ada mention
You won't be alone.
Once you get over the ugly syntax, you'll really like Ada. -
Re:Standards
You are SO right! The government shouldn't set standards under which businesses need to operate. They aren't good at it, and it's never in the public interest. They don't do it for medical devices and drugs. They don't do it for the automotive industry. They don't do it for the petroleum industry. They don't do it for food industry. They don't do it for the building industry. Name any industry, and you'll see that its one free of government-defined standards.
In fact, whenever the governmental know-nothing-types try to impose some sort of crazy standards scheme on Business, it has always been an abject failure and has always turned out to be detrimental to the public interest. Heck, we ALL recognize that we can trust that in every other industry, Business always acts in the public interest, and never makes decisions merely to generate short-term profits, so why should we allow the government to impose regulations on the computer industry?
It just doesn't make any sense! Laissez-faire is the only way, baby!
With that out of the way, to address the only concrete example you provided of a government-defined computing "standard", Ada is not just a standard. It is a *language*, developed to fulfill specific requirements, for the DoD, and it does that well. Has it lived up to all of the expectations? No, but what technology ever has?
Now, you're probably itching to answer that the DoD action of developing Ada by definition makes it a standard. Well, you'd be right, there. It is *a* standard, just not *the* standard. I do alot of consulting of the DoD, and there are many, many projects utilizing languages other than Ada that are ongoing. It was never intended to be a single solution for the entire computer industry, let alone the entire Federal government.
I only mentioned these things since you appear to be prostelitizing about something about which you know little.
---anactofgod--- -
Re:Hopefully they will write it in a better languano matter how safe the car is...it wont help you if you are a shitty driver.
All else being equal, that is true. But, it is widely recognized that some vehicles drive easier / better than others. In other words, some vehicles make it harder to be a good driver than others. C feels fast and light, but it has an unfortunate tendency to crash when used in building large software systems due to some design choices in the language.
It isn't just the case that "some languages are more adept for tacking certain types of problems," but in fact that different languages put to the same task can produce different results.
Here is one example, and here is another. Note that this is a separate issue from suitability or special abilities for a particular problem type. For example, Lisp and Prolog are (from what I've skimmed) 2x more efficient than Ada (and probably C) for coding AI related programs.
i was just speaking out against the original posters instance that by using a different language...the result would be more secure systems...which is pure bullshit...you may be solving one set of problems...but there will always be new ones to complain about.
There are two basic causes of security problems associated with the programmer (as opposed to the user): program design problems, and implementation problems. Program design problems aren't likely to be effected by the programming language per se, but the practices that a language encourages can effect program design.
"The tools we use have a profound (and devious) influence on our thinking habits, and, therefore on our thinking abilities". - Dijkstra
The second class of problems is implementation problems, or more specifically programmer errors. These can definitely be effected by the choice of programming language. There are no pointer errors in java because there are no pointers. Ada catches many problems that would have to be found during debugging with C, if they were found at all by the programmer. When the language makes a type of error impossible, or catches it at compile time, the programmer doesn't have to do it. The result is better code. In this case, more secure code. When that language encourages better program design, so much the better.
FWIW - Dijkstra had some strong views on programming languages and their suitability for use, including:
FORTRAN --"the infantile disorder"--, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.
PL/I --"the fatal disease"-- belongs more to the problem set than to the solution set.
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.
APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
As a default language, C isn't the worst, but it is by no means the best available today either. -
Re:Hopefully they will write it in a better langua
Ada is secure becasue you can't develop code with any degree of efficiency.
Thats BS and you should know it. If you don't, you are not only anonymous, but ignorant.
Here is a start for you to educate yourself.
-
Re:Get Ada 95
>Especially when it comes to languages like C++.
When you build 'bridge-like' apps you just don't use C(++)!
Examples -
Re:Hoare's Turing Award Winning Speech
Re: The Ada catastrophe:
It is a pity that the catastrophe of ADA brought down the idea of dimensional analysis with it. Of course Hoare's Turing award lecture (please don't use this for anything safety critical the compilers are certain to be full of bugs) gave a salutary warning on unbounded complexity.
You mean such warnings as:Gradually these objectives have been sacrificed in favour of power, supposedly achieved by a plethora of features and notational conventions, many of them unncessary and some of them, like exception handling, even dangerous.
I mean, how many languages use Dem Debil Exceptions these days? Or the notational dot form, as in object.method ? And apart from Boeing, Beriev, Lockheed, Airbus, Antonov etc who uses Ada for safety-critical systems?But I come not to bury Hoare, but to praise him (Hell, he invented the case statement..):
It is not too late! I believe that by careful pruning of the Ada language, it is still possible to select a very powerful subset that would be reliable and efficient in implementation and safe and economic to use
The astounding success of the SPARK subset of Ada-83 and Ravenscar subset of Ada-95 has vindicated him with a vengeance. You also have to remember that Hoare's speech(pdf) was in 1980 - and Ada-83 was greatly simplified from the Ada proposals of just 3 years earlier. But even then it was vastly more simple and powerful than C++ or Java. public static void main(String argsv){}? Ye Gods. Never mind, maybe if someone keeps on quoting the large and growing body of evidence about language choice being important, that it's not "religion" but a matter of objective measurement, and that one reason why most software sucks is that good programmers are using lousy languages, then maybe things will change..... Nah. -
Re:Hoare's Turing Award Winning Speech
Re: The Ada catastrophe:
It is a pity that the catastrophe of ADA brought down the idea of dimensional analysis with it. Of course Hoare's Turing award lecture (please don't use this for anything safety critical the compilers are certain to be full of bugs) gave a salutary warning on unbounded complexity.
You mean such warnings as:Gradually these objectives have been sacrificed in favour of power, supposedly achieved by a plethora of features and notational conventions, many of them unncessary and some of them, like exception handling, even dangerous.
I mean, how many languages use Dem Debil Exceptions these days? Or the notational dot form, as in object.method ? And apart from Boeing, Beriev, Lockheed, Airbus, Antonov etc who uses Ada for safety-critical systems?But I come not to bury Hoare, but to praise him (Hell, he invented the case statement..):
It is not too late! I believe that by careful pruning of the Ada language, it is still possible to select a very powerful subset that would be reliable and efficient in implementation and safe and economic to use
The astounding success of the SPARK subset of Ada-83 and Ravenscar subset of Ada-95 has vindicated him with a vengeance. You also have to remember that Hoare's speech(pdf) was in 1980 - and Ada-83 was greatly simplified from the Ada proposals of just 3 years earlier. But even then it was vastly more simple and powerful than C++ or Java. public static void main(String argsv){}? Ye Gods. Never mind, maybe if someone keeps on quoting the large and growing body of evidence about language choice being important, that it's not "religion" but a matter of objective measurement, and that one reason why most software sucks is that good programmers are using lousy languages, then maybe things will change..... Nah. -
Re:Space Computing: Some Numbers
The context was that of software for an unmanned microsatellite, not the shuttle.
Crewed spacecraft have an even more strict set of rules attached to the software development process. Have a look at some of the articles on DO-178B, the software development standard for avionics. Similar issues apply, but even more so.
Look, people - not Geniuses - just normal, everyday programmers - have been making software you can bet your life on for a long time now. We know how to do it even more cheaply than the normal buggy commercial work (though testing is radically expensive and blows out the total cost). There's no need, and no excuse, for BSDs and security problems. None. You just have to have the right tools, the right training, and the right attitude. If you like, the Right Stuff. Here's a quote from that article:
It's strictly an 8-to-5 kind of place -- there are late nights, but they're the exception. The programmers are intense, but low-key. Many of them have put in years of work either for IBM ( which owned the shuttle group until 1994 ), or directly on the shuttle software. They're adults, with spouses and kids and lives beyond their remarkable software program.
That's the culture: the on-board shuttle group produces grown-up software, and the way they do it is by being grown-ups. It may not be sexy, it may not be a coding ego-trip -- but it is the future of software. When you're ready to take the next step -- when you have to write perfect software instead of software that's just good enough -- then it's time to grow up.
People like myself look upon any work over about 7 hours a day more than twice a month as signs that "I personally screwed up", because I'm the guy who sets the schedule, not some PHB. We have lives. We have kids. We have hobbies. And the stuff we do is hard, the systems do a lot more than most commercial apps, and with far fewer memory and CPU resources. It's both incredible fun "boldly going.." and all that, but also a crushing responsibility when we do safety-critical work. People's lives depend on us doing the best possible job we can.One area I disagree with in the "Right Stuff" article is that the work doesn't involve creativity. This is balderdash - we're doing stuff no-one has ever done before under really tight resource constraints. To get a reliable architecture often requires significant smarts, lateral thinking. Anyone can make a complex solution to a complex problem, the really good guys and gals make solutions so drop-dead simple, obviously-correct and efficient that it's miraculous how much such simple, obvious and readable code actually accomplishes.
Looking at the general world of InfoTech, we see that most programmers out there would rather write the winning entry for the "Obfuscated C" contest than make some software that gets us around the solar system. And that people who make reliable software hit the unemployment queue on project completion, while those making buggy stuff have jobs-for-life in maintenance. Of course, they often have 80-hour weeks too, and are driven by PHBs who know b* all, and can't even take pride in the product, so there is some justice.
-
Case Study in Satellite Control
Some data about FedSat, a Scientific R&D microsatellite that's due for launch on the next H-2A from Tanegashima:
Firstly, the on-board software is in Ada-95, using the 3.13p version of GNAT as the compiler and RTEMS as the Run-time Kernel. Both Open-Source, and the 'p' in "3.13p" means public, free-as-in-beer. The on-board software was developed mostly by Software Improvements, a bunch of software professionals who are heavily into SLCMs, CMM, etc. And lo, it worketh, on-time, under-budget.
The ground station is another matter. OASIS was tried, but couldn't do all that was required. In a spectacular case of less-than-wonderful-judgement, VB on Windows was used for development. After a while, they got some software pros to work on that one too, rather than the hack'n'slash electronics engineers. Well, it partially works - enough so that a few months or years after launch, it will do most of what's wanted.
Moral: if it's important, and has to work first time, every time, do it in Ada and open source, and use the principles described in the parent article. If it's not so important, and can be fixed up afterwards, you're still better off using Ada, though Java's a good second choice. The only reason Ada's so good is that it makes it easy to adhere to good software engineering principles, such as teamwork, smart design, and open standards.
- Separate Public view and private view -> Interfaces between teams made easier
- High-level (generics, tasks etc) and low-level (address clauses) features ease design task
- Standardised - Ada-83 was standardised as Mil-Std-1815A in January 1983 and later as ISO/IEC 8652:1987, Ada-95 as ISO/IEC 8652:1995.Copies of the LRM (Language Reference Manual), style manual etc are all freely available on the web.
A.Brain, Rocket Scientist
-
Re:Yes
Modula-2 or Ada or Logo I have not seen a wisper about in years. from what I recall Logo was to be the teaching language of the future ( back in the mid 80's ), Ada was to be the next big thing is the 80's, and modula-2 was to replace C
The first language I programmed in was FORTRAN II back in the 60's, when I was under 10. The code had to be run at the Nuclear Research Establishment at Harwell in the UK. Remember, there weren't as many computers around back then, maybe 10 in the country. It made being a pre-teen 31337 haX0r difficult.
:-)The last time I programmed in FORTRAN - FORTRAN 77 in fact - was for the communications facilities for the State Electricity Commission of Victoria, a system to help restore power in case of emergency. That was in 1987.
I still use Ada - recently for the spaceflight avionics for a scientific research satellite, and will be teaching a course in it to some people doing the avionics for a helicopter in a couple of weeks. Though the use of Ada has shrunk, it's making a strong comeback in the field of avionics, where a crash in the program could mean the crash of an aircraft.
My advice to the original poster - by all means learn FORTRAN as a fifth- or sixth- language. Even the 95% Godawful languages(VB..) can teach you something. There are times I use Java and think "why the HECK can't it have feature X of Ada-95?". There are times with Ada-95 that I say "Damn, feature Y is so clumsy compared with Java." FWIW Matlab seems to be the way of the future for non-software engineers to quickly do calculations and display the results graphically, it's a pretty good FORTRAN replacement. What EXCEL is to accountants, Matlab is to scientists.
-
Re:Great Geek Girls of History
No, not Ada, COBOL.
Ada - not ADA BTW - is named after Ada Byron, Countess of Lovelace, programmer of Charles Babbage's devices.
There's at least one good biography of "Amazing Grace" Hopper on the web. A google search using the keywords "Grace Hopper" COBOL will find you more.
Oh yes, GRACE in this case is Graduate Robot Attending a ConferencE.
-
Re:Ada ?
Ada is designed to inherantly prevent a programmer who follows the appropriate standards from writing a program that can just crash and exit. As long as every possible exception has a handler, an Ada program can be written that will not crash.
In what way is Ada better than Java in this respect? I only know a little about Ada, so this is a serious question. My understanding is that Ada and Java have very similar safety goals (especially with respect to exceptions) so I'm curious about what you think Ada gets right and Java gets wrong.
Speaking as someone who's got nearly 20 years of Ada experience (started in 83) and about 3 years with Java... you're not quite right.
Exceptions and exception handling are just part of the issue. Java's exceptions are in many ways more informative than Ada's - which are basically "Exception of type X raised" rather than "Exception of type X thrown with the following additional information [blah blah]".
The more important issue is that with Ada it's trivial to make all sorts of checks that will raise exceptions. For example:
type SpeedType is new Float;
KPH
:constant SpeedType := 1_000.0/(60.0 * 60.0);-- Kilometers per Hr in standard metres/sec form. In practice the two 60.0's above would be constants, MinsPerHour and SecsPerMin respectively
subtype LegalSpeedType is SpeedType range 0.0
.. 1_000 * KPH;Any time an object of type LegalSpeedType tries to take on a negative value, or one over 1,000 Kph, you'll get a CONSTRAINT_ERROR (a predefined exception).
With Java, you'd have to have a class for CSpeed, then a derived class for CLegalSpeed, with any sets triggering a check which would throw an exception if out of bounds. It can be done relatively easily, it's just more work with more opportunities to get wrong.
Ada's a language that, when in the hands of a competent programmer, prevents the expression in code of a lot of mistakes. They're picked up at compile, rather than run, time. A hopeless incompetent can write horrible code in it, but it's actually harder to write buggy code than correct code.
One other thing: the representation clauses of Ada allow you to make records where with each individual field, you know exactly what bits mean what - and simultaneously have a high-level view so that you know that bits 7..8 of word 11 mean STOPPED when 00,STARTING when 01 and RUNNING when 11, with any assignment of 10 raising an exception.
For more data about Ada, see the Ada Information Clearinghouse. Free, Open-source compilers available (GNAT).
Two disadvantages of using Ada though. First, no-one much uses it, the products are too reliable to be commercial successes requiring lots of expensive maintenance - so a project that took 30 programmers to build only needs 1 part-time to keep it running. Forget job security, you're always doing something new, usually something really cutting-edge. Secondly, you're confined to such boring applications as spacecraft avionics, supersonic jets, medical applications, railway management, air traffic control systems, sonars, radars, missiles...
:-) -
Re:Mandating compatibility is a good idea, but...
...in the past thinking like this has resulted in things like Ada.Yes, this is true. Ada was devised as the result of 4 groups competing against each other, and the best of em (though opinions vary) selected as the Mandated Language for the DOD.
The whole process is described thusly:
The driving concern of the HOLWG was to assure that the design was guided by a responsible principle investigator, and to preclude "design by committee". On the other hand, picking a single contractor to do the job and trusting to luck would have been imprudent. The procurement was through multiple competitive contracts, with the best products to be selected for continuation to full rigorous definition and developmental implementation.
And it was a disaster from the Defence Contractor's viewpoint. Firms fell over themselves trying to get exemptions from using it, ANYTHING was better. Because Ada had
- Objects
- Exceptions
- Generics (templates)
- Multiple-threading/Tasking
- Strong Typing
.So yes, had compatibility been mandated in the past, we might all have systems far more reliable and robust. But Microsoft wouldn't have $40 Billion and a number of tame Congresscritters.
-
Prevention proven better than cure - and Feasible
All Software Engineers should have a look at Correctness by Construction: Better can also be Cheaper from Crosstalk the Journal of Defence Software Engineering. It contrasts the usual C approach with one using a really tight but powerful subset (SPARK) of an already pretty tight language, Ada
* SPARK code was found to have only 10 percent of the residual errors of full Ada; Ada was found to have only 10 percent of the residual errors of code written in C. This is an interesting counter to those who maintain that choice of programming language does not matter, and that critical code can be written correctly in any language : The claim may be true in principle but clearly is not commonly achieved in practice.
This isn't just an anecdote: there are documented facts. The results (for the problem domain of aircraft avionics and large systems) may not be applicable to the normal b2b and gamezware - but then again, they might. Have a look at the stuff in bold later in this post.
It's not a magic bullet : from the same article:
In December 1999 CrossTalk, David Cook provided a well-reasoned historical analysis of programming language development and considered the role languages play in the software development process. The article was valuable because it showed that programming language developments are not sufficient to ensure success; however, it would be dangerous to conclude from this that they are not necessary for success. Cook rightly identifies other issues such as requirements capture, specifications, and verification and validation (V&V) that need to be addressed.
But the real kicker, one that should cause everyone to sit up and take notice, is this:
- Code quality improved by a factor of 10 over industry norms for DO-178B Level A software.
- Productivity improved by a factor of four over previous comparable programs.
- Development costs were half that typical for non safety-critical code
- With re-use and process maturity, there was a further productivity improvement of four on the C27J airlifter program.
One more thing: the SPARK and similar RAVENSCAR ( pdf, HTML version here) subsets of Ada-95 are just that : (proper)subsets that just omit certain language constructs. Write to the profile, and the code is compileable by any Ada-95 compiler, like the downloadable Free GNU version GNAT 3.14p (though commercial users might want the latest-and-greatest non-free version 3.15a. And the ORK (Open Ravenscar Kernel) is, as the name implies, an Open Source Kernel for reliable real-time embedded systems.
Better, Cheaper, Faster, Open-Source with Free-as-in-Beer downloadable compilers. IMHO worth at least investigating, even if you decide Microsoft's latest language-du-jour is more appropriate for your situation. YMMV, and COBOL, C++, Assembler, C#, Java or even VB might be better in your case. But worth a look.
-
Prevention proven better than cure - and Feasible
All Software Engineers should have a look at Correctness by Construction: Better can also be Cheaper from Crosstalk the Journal of Defence Software Engineering. It contrasts the usual C approach with one using a really tight but powerful subset (SPARK) of an already pretty tight language, Ada
* SPARK code was found to have only 10 percent of the residual errors of full Ada; Ada was found to have only 10 percent of the residual errors of code written in C. This is an interesting counter to those who maintain that choice of programming language does not matter, and that critical code can be written correctly in any language : The claim may be true in principle but clearly is not commonly achieved in practice.
This isn't just an anecdote: there are documented facts. The results (for the problem domain of aircraft avionics and large systems) may not be applicable to the normal b2b and gamezware - but then again, they might. Have a look at the stuff in bold later in this post.
It's not a magic bullet : from the same article:
In December 1999 CrossTalk, David Cook provided a well-reasoned historical analysis of programming language development and considered the role languages play in the software development process. The article was valuable because it showed that programming language developments are not sufficient to ensure success; however, it would be dangerous to conclude from this that they are not necessary for success. Cook rightly identifies other issues such as requirements capture, specifications, and verification and validation (V&V) that need to be addressed.
But the real kicker, one that should cause everyone to sit up and take notice, is this:
- Code quality improved by a factor of 10 over industry norms for DO-178B Level A software.
- Productivity improved by a factor of four over previous comparable programs.
- Development costs were half that typical for non safety-critical code
- With re-use and process maturity, there was a further productivity improvement of four on the C27J airlifter program.
One more thing: the SPARK and similar RAVENSCAR ( pdf, HTML version here) subsets of Ada-95 are just that : (proper)subsets that just omit certain language constructs. Write to the profile, and the code is compileable by any Ada-95 compiler, like the downloadable Free GNU version GNAT 3.14p (though commercial users might want the latest-and-greatest non-free version 3.15a. And the ORK (Open Ravenscar Kernel) is, as the name implies, an Open Source Kernel for reliable real-time embedded systems.
Better, Cheaper, Faster, Open-Source with Free-as-in-Beer downloadable compilers. IMHO worth at least investigating, even if you decide Microsoft's latest language-du-jour is more appropriate for your situation. YMMV, and COBOL, C++, Assembler, C#, Java or even VB might be better in your case. But worth a look.
-
Re:Programming in the US Military
Ada is almost dead in the military. Why? Because there isn't enough money in maintaining Ada programs. They work, first time. Great for the military, lousy for the military-industrialist complex. Spend twice as much making it in the first place, then get no lucrative bugfix money afterwards. Making expensive programs that actually work is commercial suicide. Making cheap programs that actually work (which you do after some experience) gives you only subsistance level profits. Making cheap programs that almost work and require lots of profitable maintainance for years is the road to riches. So what if a few ships need towing to port due to a divide-by-zero error?
Of course, where firms could get sued if they screw up, such as in commercial avionics and jet engines, Ada is universally used. Ada doesn't guarantee good, safe, maintainable programs, but it's relatively easy to make them in Ada, and darn near impossible to make them in C.
As for Ada being harder to learn than C, which is harder
for(i=0;i<BUFFER_SIZE;i++){ :
read(i);
}
or
for i in buffer loop
read(i);
end loop;
Maybe if people just quietly gave facts and hard numbers in the Great Language Wars then the Truth Will Out.... Nah. But it's worth a shot, anyway.
-
Try Ada-95
URLs To backup my bald assertions below. Browse the sites and you'll see studies and numbers. Facts not Religious opinion. Adapower is a good start. Or the Ada Information Clearinghouse
"intuitive and easy to use IDE; simplified GUI design and event handling; advanced error handling; advanced object oriented design including multiple inheritance, abstract classes, and garbage collection; full support for operator and function overloading; and portable (at compile-time) across various platforms."
IDE - there's a variety of freeware ones.
Simplified GUI - there's a variety of bindings to various APIs, from X-windows to SWING to W32. Plus many other simplified freeware ones, some thin, some thick. Pick which one is most appropriate. Ada (the language) doesn't have anything more advanced than stdio - but then again, neither does Java, it relies on the awt and swing libraries *shrug*
Advanced Error Handling - Java's exceptions contain more info than Ada's. Ada ones are more simple, easy to use, but I think Java's are better in most ways. They should be - both C++ and Java copied their exception handling from Ada's 1983 incarnation. OTOH most of the time all Java programmers (like me) do is make an exception without using any of the internal data, so YMMV.
Advanced OOD including multiple inheritance and abstract classes - As regards OOD. Ada's the most flexible of the lot. You can do strict OO, but don't have to. Methods are properties of Classes(actually packages) rather than objects, so you can say Wooden.paint(a_wooden_door) or Door.paint(a_wooden_door) rather than a_wooden_door.paint(). So you get all the advantages of multiple inheritance, without the horrendous penalties (which method are you inheriting, the paint for wooden things or the paint for doors?). Abstract classes are used all the time.
Garbage Collection - Ada doesn't produce garbage in general. You can do most things using statically allocated memory, or dynamic allocation within a statically-defined garbage-collected area. When you want dynamic allocation, you can choose to rely on the compiler's garbage collection, if it exists, but you're also given tools for explicit disposal of garbage. Note that Java has true garbage collection, but even Sun says that you can't rely on it, you should use explicit disposal. This is true not just for Java, but in general.
Operator/Function Overloading Ada has had this since 1983. Often copied, never bettered
Portable Stories abound of million- and 100,000-line Ada programs that require a dozen lines changed to make em work on different systems. My own personal war story is of a 20,000 liner developed on a 386 on an Irvine compiler, ported with 3 lines changed to a MicroVax using a DEC compiler, thence to a Vax using another DEC compiler, then to an embedded system using a DDC-I compiler. Was an AI to do anti-missile defence, people's lives depended on it. It's been in service since 1995. Cost less to make than the 7,000 lines of C in its test bed too. I've just help finish a 20,000 line piece of spaceflight avionics that makes not one Operating System call, even though it has 60+ simultaneous threads of execution. Oh yes, there's a shareware (or GNU licence? I forget) Ada compiler that produces Java bytecode, so will run on any Sun JVM.
So why isn't Ada-95 used by anyone? Because everyone knows it's too big (nearly as many keywords as C++,), needs a huge machine to run (bigger than a 286 running at 4 MHz - which was big in 1983 when Ada-83 was invented), it's designed by a committee (like Linux - one really good designer Jean Ichbiah, then peer review), and it's a product of the US Military (like Unix, and the Web - designed for not by). Oh yes, and expensive (GNAT is open source...) and uses a lot of risky concepts ( to wit, Operator Overloading, Object Oriented Design, Exceptions, all risky and untried in 1983 ). It's also obsolete, (the Ada-95 version being a little younger than C++). And it is used, for Avionics of all modern airliners ( Illyushin, Boeing, Lockheed, Airbus) and many satellites, railway- and air- traffic control systems, where quality is vital. It's not used much elsewhere, as there's a vested interest for software developers and programmers to keep software buggy (so they have job security) and quick to market (it takes a long time to develop reliable software).
So Ada's perfect, right? Wrong. It's just better than most general-purpose languages for many purposes. BUT It's not language of the month ( C# this month? ) so getting Ada programmers is very difficult. Though it's easy to learn, based like the similar Eiffel, Delphi, Object Pascal and Modula-2/3 on Pascal. If you've programmed hardware design in VDML, or used Oracle's access language, you've used Ada without knowing it.