Ada 2012 Language Approved As Standard By ISO
hypnosec writes "The Ada Resource Association (ARA) announced that the Ada 2012 programming language has been approved and published as a standard by the International Organization for Standardization (ISO). Announcing the development, ARA and Ada-Europe said that the new version brings with it the concept of contract-based programming, Concurrency and Multicore Support, Increased Expressiveness and Container Enhancements.'"
Seen it used for some logic in a gateway that converted one network medium to another (and did a bunch of other not-so-trivial things while it was at it..).
I wouldn't really have classified it as an "algorithm" language. If anything it's a logic language with a major focus on reliability (lots of strong typing and compile time error detection) and fault handling (really good run time error handling).
http://en.wikibooks.org/wiki/Ada_Programming/Ada_2012
The G
I click on the contract based programming link to know what the fuss is about and I get landed on a separate press release? Wtf?
Always read the fine print before you agree to follow a contract...
Now you know, and knowing is half the battle.
I've seen it. Nothing crazy or particularly unusual about it.
Big thing with ADA is the focus on reducing errors. Very strongly typed with a lot of compile time checking and strong run time checks (and the ability to handle them gracefully). It seems to be used in environments where reliability and error free execution are critical: defense, aviation (the planes and air traffic control), etc. I've never heard of it used in the medical field but it would make sense.
Like anything else though there is of course trade offs to support this. Plus because ADA is expensive (yes yes, I know, GNAT..) and people who know it are rare and expensive. This seems to have turned it into a niche language.
Also the ADA community in general are an unusual bunch. There is almost an apple level fanboyism going on.. it's weird.
I did it at university because they thought it would teach people good programming habits. In fact it just made us hate Ada and look for ways to subvert it, like redefining "-" to add values together.
Ada is extremely pedantic. The idea is that it enforces good coding practices and prevents the kinds of subtle errors that can creep into more flexible languages like C. Supposedly some people in the aviation and space industries use it for mission critical stuff.
const int one = 65536; (Silvermoon, Texture.cs)
SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
I've used it, its not any crazier or complex than anything else.
I used it once, for a course on parallel programming.
the choice of ADA for that language by the faculty was stupid as hell - it's practically the only course in that university that uses ADA so the course becomes an ADA course rather than parallel programming course, the practice work is really trivial except for the fact that it's ada and it's a bitch to find ada information that isn't loaded with "IT'S MILITARY GRADE, YO!!!" bullshit for the first 10 pages of the text, making it a bitch to find out the simplest things about string manipulation and output.
on the other hand, ADA had such sweet parallel programming mechanisms(rendezvous etc) that you didn't have to learn much anything about parallel programming, last I heard they even dropped semaphores from the course work.
it's supposed to be really reliable though, but if every fucking book about it has to justify it's existence with that for half the book.. it just starts feeling fishy.
world was created 5 seconds before this post as it is.
It is always good to know that the language designed by committee has in fact passed the committee.
You know you are doing poorly when the major user of your product, in this case the military, has been turning away from Ada to C/C++ for the last decade. The F-35 is one example. Even parts of the F-16 software have been rewritten to C/C++ by now. There are still some use cases but all newly written software seems to be C++. Another example is SpaceX who used C/C++ to write their flight control software as well.
I've used it in years past. The languages that I've used that help me produce code that just works, no matter how inclined I am to screw things up, are F#, Scala, Ada -- basically your strongly-typed languages keep me out of trouble. If you can handle the pricing and/or license issues, I would still recommend Ada as the best fit for procedural/OO programmers who want to work with tools that sustain quality. I'd expect that a very highly skilled team that wrote F#, Scala, Lisp, or Haskell could beat the dog out of most Ada teams for productivity over a few months or even a few years, but that over a period of many years, a good Ada team would be hard to bear for reliability and maintainability.
I have been using Ada for the last 5 years professionally and for my personal project. Most of them can be found here http://www.codelabs.ch/ or here http://git.codelabs.ch/.
Well, that's all the Ada programmers accounted for.
I am anarch of all I survey.
Ada is used in lots of places where the application is safety critical or there is a need for high reliability.
It got a lot of bad press, mostly because it originated from a request from the US DoD for a single language to do "all things". It's original MIL-STD designation was 1815 (Ada Lovelace's birth year).
Many aircraft have their flight control systems built in Ada, eg: Boeing 777, Apache Helicopter.
From memory the GPS Block II Satelites, not sure about the Block III.
The original Ada 83 compilers were pretty awful - slow and produced horrible code. But they got way better. Because the language required a "program library" to store information about the compiled units (yes, GNAT showed that it wasn't really necessary), the optimizers in the middle pass and back-end had access to more information than normal, giving scope to some very effective optimizations. I've seen generated code that was as good as the best hand coded assembly - multiple levels of inlining, removal of sub-routine pre and post amble code, delayed branch slot filling, value propogation used to remove implicit and explicit tests etc.
My biggest challenge was always the lack of support for the latest and greatest libraries, eg: X11, MOTIF and their Windows equivalents.
Microsoft bought off all the national bodies of ISO when they ramrodded through their undocumented and impossible to implement "document standard". If ISO knew anything about business processes or standards development they could have prevented that panel-stuffing result. And yet one of the standards they set is business processes for just this situation. I don't trust them any more and I don't think you should either. They are too easily swayed by corporate interests.
Ada's cool in the esoteric nerd sort of way. Like SNOBOL or APL. I shared a girlfriend with one of the Strawman implementors of ADA and knew him moderately well. She was hot (she's probably a great-grandmother now) and he was cool, it was fun, and I'm still fond of ADA. I'm not fond of overloading operators and keywords in an RTOS in the practical sense, but as an artistic exploration of tech potentials I'm all for it as long as you don't make it the OS/language for a drone or something similar. I've never been a fan of garbage collection. It solved some problems I'd rather work around. Sadly Ada went rather overboard in the dynamic re-purposing of symbols, resulting in some unfortunate but predictable side-effects and plain code that had indeterminate use based on context.
If you can't count on a word symbol to mean a quite specific and limited thing, you can't anticipate what your app will do. In my own mind, that was the problem with ADA. By subtexting and repurposing everyting - including the "=" operator and keywords like "if" they created a thing that was useful for mapping and mimicking human intellectual processes but not for doing useful stuff.
Help stamp out iliturcy.
And you know... those projects that moved from Ada to C/C++ are strangely overtime (many years by now) ONLY because of software BUGS. Seems like they got a lot of problems from that switch.
And IMHO if your programmer can't learn enough Ada to be productive in 2 weeks then they are quite bad programmers.
Anybody here using Ada, or has used Ada? Not implying anything, but genuinely interested. Isn't Ada one of the most crazy complex algorithm languages ever invented? Just my impression.
I've used it a lot, but not lately. Its syntax is Pascal-like rather than C-like. However, I think Ada 2005 introduced the C++-style syntax for methods.
It does have a lot of complex features, e.g. rendezvous for distributed programming, but you can get started by ignoring most of the unusual stuff and using a subset that is very much like Pascal, then learning the advanced features as needed.
Supposedly when it first came out they had to invent new compiler technology to implement it, but things don't look so exotic now. Lots of integral support for real-time and distributed systems, and as others have said, verbose and an emphasis on reliability. Those last two are related: it makes you say what you mean and mean what you say. Ada programmers laugh when they hear someone describe C++ as "strongly typed".
However, in my experience the more I worked on it the leaner my code got and the more I was able to think on the level of abstractions rather than details, e.g. by using the 'range attribute when looping over arrays.
C# went Ada 95 one better on pragmas and attributes, but I don't know what Ada did in 2005 or 2012. I found them *really* helpful.
Can't give much more comparison, because I'm not up on the latest features of more familiar languages either.
Supposedly the space shuttle's on-board system was written in a subset of Ada.
Sheesh, evil *and* a jerk. -- Jade
I've used it in years past. The languages that I've used that help me produce code that just works, no matter how inclined I am to screw things up, are F#, Scala, Ada -- basically your strongly-typed languages keep me out of trouble. If you can handle the pricing and/or license issues, I would still recommend Ada as the best fit for procedural/OO programmers who want to work with tools that sustain quality. I'd expect that a very highly skilled team that wrote F#, Scala, Lisp, or Haskell could beat the dog out of most Ada teams for productivity over a few months or even a few years, but that over a period of many years, a good Ada team would be hard to bear for reliability and maintainability.
In my experience Ada catches things at compile time that other languages leave you to catch at run time, and catches things at run time that other languages leave you to discover when you find out you've been getting erroneous results for bog-knows how long.
Sheesh, evil *and* a jerk. -- Jade
FYI: It hasn't been called "ADA" for some time, simply "Ada."
Never was "ADA". It was named after Ada, Lady Lovelace, whose birthday we discussed here a few weeks ago.
Sheesh, evil *and* a jerk. -- Jade
I'm using it for time-critical stuff. It's complex and has some arcane syntax features, but it's still easier than C++ and a lot safer than C and C++. One problem is the lack of free or affordable compilers, there is not enough competition to GNAT and AdaCore makes sure that the *really* free FSF version with MGPL lacks essential features, whereas their own free versions are useless for anything but GPL'ed software.
Overall it's a very powerful and fast language that I would recommend for real software development (as opposed to gluing together other people's libraries).
Let me add a note for the community: yes, they are almost as bad as Apple fanbois when it comes to advocating Ada, but aside from that it's the friendliest community I've ever met on the Internet.
When I as a hobbyist, who dabbles a bit in Ada, can ask questions and get answers from professional industrial programmers with multiple large mission-critical systems to their name, and get these answers in a friendly supportive tone, I think I am justified to say that this is a nice community.
"I know I will be modded down for this": where's the option '-1, Asking for it'?
No FUD at all. Ada is worthless without the runtime. The license of the GNAT Ada runtime forces you to put programs compiled with the GPL version (mainly developed by AdaCore) under the GPL, too. The FSF version is licensed under the MGPL, a modified version of the GPL that allows you to use the runtime in non-GPL'ed software. However, the MGPL version lacks some essential libraries.
The restrictive licensing of GNAT is probably one of the major reasons why Ada never became very popular for general purpose programming. It's a great language but lacks compilers.
..But most products are created by small teams of programmers, have a lifetime of a few years, don't need to be anywhere as reliable..
And that, dear readers, is why I really hate what passes for programmers nowadays.
The oldest code I've wrote that I know of which is still currently in daily use is now at the 22 years old mark, was done in assembly, was only really intended to 'work' for a year at most (was done for a R&D prototype, they kept the code in for the production models.)
(And, yes, I have, for my sins, dabbled in Ada)
"Anybody here using Ada, or has used Ada"
A LONG time ago. This was in the period long enough after its release that people were getting used to what worked and what didn't. Like C, Ada has any number of constructs that you don't really use because they tend to make things harder. If you used its base functionality you had what was basically Pascal with very strong error checking, and that I didn't mind.
But throughout my (limited) use, I couldn't help but shake the feeling that Ada *really* wanted to be an OOPS language. For instance, there's constructs in the language itself (as opposed to libraries or such) that return the bounds for variables. That way you can do bounds checking in code using those constructs. The difference between that construct and a dot-syntax OOPS language is basically zero, yet they put all of this machinery into the basic system but not the rest that would give it true OOPS functionality (at the time, I suspect this has changed).
If anything is "wrong" with Ada, it's that it was defined maybe 3 or 4 years too soon. The structured programming of Pascal was clearly a major input, but at the time of definition the fact that OOPS was the future was still being *heavily* debated. I do wonder what a post-OOPS Ada would have looked like.
..But most products are created by small teams of programmers, have a lifetime of a few years, don't need to be anywhere as reliable
Because, after all, who cares if people's credit card numbers, SSN's, home phone numbers and other items leak out all over the Internet? Just as long as the software got written fast and cheap.
I did it at university because they thought it would teach people good programming habits. In fact it just made us hate Ada and look for ways to subvert it
That's a shame. I was also introduced to Ada at university and, while I accept that the syntax is pedantic, it was demonstrably extremely useful. Now I just see it as another tool which I could competently apply to problems where high reliability is mandatory and distributed/concurrent algorithms are involved.
Where is moderation: -1 False?
ADA had generics long before VHDL. From the first version of Ada in fact. Stepanov and Musser wrote the Standard Template Library for Ada in 1987 C++ Standard Template Library was first developed in ADA and then ported to C++ in the early 90s.
Just to complete the trivia, Oracle's PL/SQL has a syntax that was based somewhat on Ada.
What do you know I wrote a novel
This very argument happens in chip design where we have two languages VHDL & Verilog. VHDL is very much done in the Ada Model and is a direct descendant where Verilog comes by way of C. There was a language shoot out back in the late 90s when this argument had more life with similar results. Verilog lets you get things done in about half the amount of text and about twice as fast as writing the equivalent in VHDL. Verilog gives you every chance to mess-up, i.e. it doesn't hold your hand. VHDL smothers you with compile-time warnings, Interface checking, etc.
Both have a large number of followers now-a-days. VHDL is strong in the FPGA community (pushed by Xilinx) and in Europe. Verilog has more adherents in the US & Asia.
What it comes down to in my line of work is time - Verilog + Linter is faster than VHDL in getting the job done. (IMHO!)
Have you compiled your kernel today??
I looked at it briefly in college. Everyone I've seen in the "real world" that needs that level of reliability uses C++. You catch a lot of stuff at compile time in C++ that would make run time errors in other languages. This was one of Ada's big selling points too. Strong typing might be a pain in the ass for your average programmer, but it's still around for a reason.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Yes, people are using Ada, in fact, it's been making a quiet comeback. Ada is the #16 most popular language according to the TIOBE programming language survey of November and December 2012, an increase from #19 in November 2011. Keller reports that by 2000 Ada use had decreased and then increased again. It's not huge compared to C or Java, of course; its use is focused in certain domains. In certain communities, such as aviation software, it continues to be a popular language and has been credited with helping to produce high-quality software within time and budget.
Historically, Ada was developed by the Department of Defense (DoD), and the DoD tried to make it the one and only universal language . An NRC report on Ada talks about this. Fundamentally, trying to make one language do everything was a bad idea, and predictably failed; there is still no one language that can be all things to all people, even many years later.
Ada isn't a complex language by today's standards, but it has a lot of "pickiness" that means you have to obey more rules. Is that a good thing? Well, you first have to understand what it was designed for - and then decide if that design is what you want.
Ada focuses on software that needs high reliability and yet absolutely no compromise of performance. If reliability isn't really all that important to you, or you can give up a lot of performance, then Ada's trade-offs may not work for you. For reliability, it has a strong typing system, and you have to use generics (etc.) instead of just saying "shut up and trust me" a la C. For performance, it doesn't mandate automatic garbage collection (as compared to Java or Python). Ada shines when you're writing programs that will could un-intentionally kill people if the program is wrong or takes too long. Think airplane flight controls, train systems, medical systems, that sort of thing. A lot of Slashdot readers have never tried to write software that could accidentally kill people, and thus can't understand why you might want a "picky" language like Ada. If your response to "it has a bug" is just "install this patch" maybe another language would be fine. But when mistakes can kill, having a language that helps prevent them can be literally a lifesaver.
- David A. Wheeler (see my Secure Programming HOWTO)
One hosted using Google Code (last work appears to be have been done in May 2012):
Here's another one from the AdaCore site:
I have been a captive in America my entire life. Everybody and everything uses customary units instead of metric.
And didn't the failure of Algol 68 lead to Niklaus Wirth's Pascal, as a simpler, better Algol 60? And for whatever Pascal's limitations (Hello! Is there a String type? Is anyone even home?), Pascal developed a reputation of being really simple to parse, which resulted in its adoption by Anders Hejlsberg, er, I mean Phillipe Kahn in Turbo Pascal? And hadn't Wirth by some point admitted that Turbo Pascal had become the "reference dialect" of Pascal?
And when the U.S. Department of Defense held its competition for One Compiler to Rule Them All, they gave the prize to a French dude named Jean Ichbah, who gave us Ada, which was essentially Pascal with (separately compiled) modules, although Pascal compiled so fast, its fanboys claimed you didn't need separate module compilation and linking? And didn't Wirth come out with Modula, Pascal "done right" with modules, but no one would use it because it was all Bondage and Discipline to an extreme? And didn't Kahn (er, I mean Hejlsberg) come out with Turbo Pascal 4, a much friendlier Pascal with Modules?
And wasn't Ada immediately disrespected by the Sons of Algol (Djkstra, Wirth) as being a committee-designed Abomination? And wasn't it for the longest time that no one had a compiler for it, which called into question the ambigious semantics and whether programs in Ada would ever be "theorem proof" reliable?
And hasn't C-style syntax pretty much won out over Algol 60-derived syntax (Pascal, Modula, Ada)? And that everybody who is into "Bondage and Discipline" programming in this day and age (strict types, good compile time and run time error checking) pretty much embraced Java?
So I guess Ada has its "community" of "dudes with crew cuts, clean shaven, and with pocket protectors working for Defense contractors", does Ada have any "street cred" with the academic "software theorem proof" or "software reliability" communities?
1. Ada lets me say clearly what my code is supposed to be doing in the code itself; I don't have to write coding tricks, I don't have to write comments that explain what the code really does. I can write code that I can read a year from now or some other coder can read ten years from now and we'll both know what it does. Sure, I can still write obscure, obfusticated code, as can anyone who doesn't care about the long term, but it lets me do it right if I want to. Other languages fall short of this.
2. Ada turned out to be a language for software engineers, not coders. The two guys who were its chief architects, Jean Ichbiah of Honeywell and Tucker Taft of AdaCore, were/are consummate software engineers (Jean did the first version, Ada83, died about 5 years ago; Tucker did Ada95, 2005, and 2012). In general, the more educated and experienced you are as a software engineer, the more you'll like Ada.
3. In my opinion, the military use of Ada failed because good Ada programmers are not psychologically suited to work for big defense contractors. Likewise, big defense contractors don't want to pay people who write code the kind of money that good Ada programmers are worth. So they hire five cheap coders instead and it takes them seven times as long to do the coding. (It's a good thing that funding for Defense is unlimited.)
4. Ada also suffered from the COTS (Commercial Off The Shelf) fad that swept the military in the 90's. If any coding was needed and possible, it tended to be Visual Basic or C++. The closest we got was PL/SQL (Ada-derived).
Will Ada ever make a come-back? Probably not; the urban legends about it being complex, designed by a committee, and militaristic will overcome its ability to be more reliable and cheaper over the life-cycle. I can only hope that all the life-critical software I encounter -- airplanes, medical equipment, my 2021 self-driving Toyota -- is coded in Ada.