6 ms·
Ada 2012: A New Language for Safe and Secure Software (2012)
- jmilkbal 11y agoThese articles give the worst impression of Ada possible. It's not the it's a specialized language for the military, but a language created to cleanup the DoD's software nightmare of the 70s, which is not unlike the software nightmares of today. It just happens that they had a pretty good grasp, even at that time, of what helps make good software easier to write, large software projects easier to manage and maintain, and strong ideas about how much a language should intervene if the programmer is doing things that look pretty dumb. Ada has a neat OO system (not like the Javas or C++s), built-in state-of-the-art tasking (since 1983!), ranged types (one of the things I can hardly bare to live without), but also simple things like switches that aren't useless and just a general appreciation for what a discrete type can allow you to do. It has generics, too, though I know they've been proven irrelevant by newer languages. Have you seen that new Java 8 date time stuff? It's playing catch up to Ada. Ada's numerics are, hands down, the best facilities of any mainstream language. Most importantly, it's probably already available for your Linux distribution because it's a part of the GNU Compiler Collection, which means that it's on the commercial OS you've settled for, as well. An out of print book that I always recommend to those who are interested in playing with Ada is John English's "The Craft of Object-Oriented Programming". Enjoy. http://www.adaic.org/resources/add_content/docs/craft/html/contents.htm http://www.adaic.org/resources/add_content/docs/craft/html/c...
- endgame 11y agoI had to do one assignment in Ada during my undergrad. It felt like a gift from an alternate dimension.
- stickfigure 11y agoI did the first couple years of my undergrad (starting 1990) in Ada. I liked the generics, although the lack of inheritance was peculiar for an OO language. As a Pascal programmer in high school, Ada was pleasant and familiar, but I quickly lost interest when I discovered Eiffel. Eiffel felt like what Ada should have been from the beginning. I've not written a single line of either post-graduation.
- pjmlp 11y agoSadly both suffered from enterprise prices by the compiler vendors. Although Ada seems to be quite well in high integrity systems. At least that is my perception from the, now regular presence, at FOSDEM and European safety conferences.
- marrs 11y ago...although the lack of inheritance was peculiar for an OO language I almost see that as a feature. ;)
- jmilkbal 11y agoAda had OO from Ada 95, though it doesn't look anything like the OO in most mainstream languages of today. In Ada 95, tagged types were introduced which were based on Ada's powerful record types and Ada 2005 introduced interfaces in a style similar to Java. Java and Ada have both taken plenty from each other over the years. Edited because I was misleading about the introduction of OO.
- david-given 11y agoI discovered Ada 2012 last year, and ended up doing a chunky writeup on it: http://cowlark.com/2014-04-27-ada/index.html http://cowlark.com/2014-04-27-ada/index.html It's a seriously nice language --- it feels like a mature, well-thought-out C++ without a lot of the craziness and ancient edge cases. There are moments of sheer brilliance: the pointer scoping semantics mean that it's actually _syntactically invalid_ to leak pointers from an inner stack frame to an outer one. Its tasking and concurrency support is amazingly good. Having proper nested functions are amazing. The type system, while no Haskell, is easily good enough to say things like 'bounded array of tagged unions with length not known at compile time', with both compile and run-time error detection. And all this produces code that performs on a par with a modern C++ compiler! Here's a multithreaded Mandelbrot renderer what I wrote: http://ideone.com/a1ky4l http://ideone.com/a1ky4l Note that each thread is a scoped object nested inside a function, communicating with each other via strongly typed and named messages --- startup and shutdown synchronisation happens automatically... That's not to say there aren't warts; the OO system is pretty painful, with some annoying hidden requirements (e.g. you have to define a class' methods adjacent to the class structure itself, otherwise the compiler gets confused; if this is a requirement there should be explicit syntax for it). Having case insensitive identifiers is a complete failure. Exceptions are just plain clunky. There are a number of syntactic weirdnesses where the language got expanded beyond the original syntax' ability to cope. But the big omission is that there's no garbage collector, even though the language was obviously designed to have one. It would be so, so much nicer to write real code in if it had one. Ada really deserves to be better known than it is.
- jmilkbal 11y agoThere is at least one error in your "About Ada" section. The language was not designed by the Department of Defense, though it did meet specifications laid out by DoD called the Steelman. The language was designed by Jean Ichbiah and his team at CII Honeywell-Bull for a competition held by the High-Order Language Working Group, a group within the DoD. Four languages were submitted: Red, Yellow, Blue and Green, of which Green won and became Ada. http://www.adahome.com/History/Steelman/steeltab.htm http://www.adahome.com/History/Steelman/steeltab.htm http://www.adahome.com/History/Steelman/intro.htm http://www.adahome.com/History/Steelman/intro.htm
- ble 11y ago> It has generics, too, though I know they've been proven irrelevant by newer languages. Is it wrong to read this sentence as snarky?
- reitanqild 11y ago> Is it wrong to read this sentence as snarky? Honest question, honest answer: yes. Dry humor maybe. The reason why my snark detector passes this one is because there is no reason for the author to be snarky here.
- mcguire 11y ago"It's not the it's a specialized language for the military, but a language created to cleanup the DoD's software nightmare of the 70s, which is not unlike the software nightmares of today." The nightmares aren't like each other, they are the same nightmare, just with the spooge scraped into slightly different piles. Further, a language won't clean it up; that's going to take something seriously different. In fact, I suspect the spooge is irreducable past a certain point. I believe it is the nature of the problems. That being said, Ada is a significant improvement over many others, in many cases for the reasons you describe. "though I know they've been proven irrelevant by newer languages" Uh, what?
- the_why_of_y 11y ago> "though I know they've been proven irrelevant by newer languages" > Uh, what? Sarcasm, presumably; cf. Golang.
- jmilkbal 11y agoT'was programming language satire at it's finest, in my opinion. :)
- gmfawcett 11y agoA non-free resource that I found very helpful in learning Ada was "Ada for Software Engineers" (http://www.springer.com/us/book/9781848823136 http://www.springer.com/us/book/9781848823136). Although it covered Ada 2005, not Ada 2012, it otherwise has excellent coverage of the Ada feature set, with a focus on programming-in-the-large.
- krylon 11y agoI have only tried Ada for a few toy programs, but given the reputation it has with some people, I was pleasantly surprised. Ranged types are awesome. Like I said, I did not use Ada a lot, but I have on a few occasions when programming in other languages missed them. Also, the diagnostics the GNU Ada compiler gave me were a lot more helpful than anything a C++ or C compiler ever gave me.
- jmilkbal 11y agoDuring a presentation, I tried to show a ranged type implementation in Java. To put it mildly: it's a mess.
- copx 11y agoAmerican programmers like to think they are engineers. German ones cannot because "engineer" is a legally protected title here and programming is not recognized as an engineering discipline. I think that is justified by the way. Programming is a fad / fashion driven industry more than anything. This is relevant here because whenever I look at Ada source code I hear synth pop. It is so 1980s. Sorry, maybe if Google or some other hip company took Ada, and simply changed the superficial appearance (i.e. syntax, identifier names) to look more 2010ish, gave it a cool name, and marketed it as the hot new thing it might go somewhere. Sad fact is, whatever merits Ada has or does not have is completely irrelevant until that happens.
- mauricemir 11y agoProbably explains why Germany is such a powerhouse in software development NOT. I do wonder about the effect of all the bright kids who would do CS/Computing in the USA/Uk instead want to work for Audi. Rigid hierarchies do have down sides until recently get put on the vocational track in the German school system that was it you where on it for life and it was almost impossible to go from Aprentice-> Technician to Engineer.
- kriro 11y agoIt might not be a powerhouse but it's fairly stable/good. There's at least one major player (SAP) there's plenty of companies in future fields (Metaio for AR for example) and there's a lot of in house stuff. There's also sort of an "alternative OS" tradition (Suse, yellowTAB). There's also more of a focus on business software (SAP influence might shine through) imo (the difference between Wirtschaftsinformatik and Information Systems has been discussed at length in journals) Berlin is one of the better non-SV startup locations from what I hear.
- mcguire 11y ago"There's at least one major player (SAP)..." I'm not very familiar with any of the other examples you mention, but, uh,.... Have you ever gone anywhere near SAP?
- jeff_carr 11y ago"Ada: A New Language" Haha. Did I just take some acid and end up back in 1973. That would be cool if this is true. Now I can really see Pink Floyd live.
- kriro 11y agoThe only thing I remember about Ada is that it introduced exceptions (or maybe was one of the languages that spread it). Useful little tidbit since I like to keep a mental picture of what languages roughly influenced other languages. +it has a military/secure programming background (and thus is inherently friendly towards proving/verification) It was fairly widespread in Austria for a while (90s). Never really used it and kind of expected it to be dead or only used in specific old systems. Interesting to see that there's a new version (I have to admit I'm still stuck on 95 and missed 2007 completely). Edit: I think SAP generates roughly 1/3 of all European software revenue so that's already pretty major. Germany has always hovered around 50% of the European software market (last time I checked was a couple of years ago)
- pjmlp 11y agoExceptions were already in CLU and Mesa (70's), among others.
- jcadam 11y agoI was an Ada programmer for about 4 years in the aerospace industry. I remember my last Ada project. It was run as a traditional 'waterfall' project (In the early 2010s). I sat in my hole (cubicle, in the very center of a massive cube farm) coding away on a simulation model for a satellite's attitude control system, while the other devs worked on their own modules in silence and isolation. Integration and testing was pushed all the way to the end of the project. I was a scumbag contractor, hence I was not allowed to see the complete code base like the regular employees were, so I couldn't, say, do a complete build to verify my stuff worked (because some of the libraries I needed to build my module I wasn't allowed access to). So I was armed with the Ada compiler as one of my only tools (I just had to ignore the link errors. Though, I was able to code up a few tests for some of the algorithms I was able to isolate, even though unit testing was neither expected nor encouraged, as it did nothing to increase my SLOC numbers -- i.e., "wasting time"). I worked slowly and deliberately (getting constant flak for my SLOC numbers not going up fast enough -- and apparently if you ever reduce your SLOC, you've made negative progress), and at the end when I passed my code off to the 'build master' to my amazement my module built and largely just worked. I have to give credit to the language -- it caught a ton of stuff at compile time. Suddenly I was no longer a slacker (Gee, thanks). At the end of that project I left and never touched Ada again. I now (probably unfairly) associate Ada with old-school waterfall-driven software development and dank, dark offices with flickering, soul-sucking fluorescent lights.
- monocasa 11y agoYou'll like this: http://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt http://www.folklore.org/StoryView.py?story=Negative_2000_Lin...
- jcadam 11y agoBeen a while since I read that :) I do remember entering a negative number one week on the manager's "status spreadsheet (an excel spreadsheet on a network share that he asked everyone to edit)" next to my name. Of course he came by asking for an explanation, and if memory serves had me enter the number of lines deleted as a positive number, so that the 'metrics' he reported up the chain didn't look bad.