Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ada 2012 Language Standard Approved by ISO (adacore.com)
71 points by qznc on Dec 22, 2012 | hide | past | favorite | 34 comments


But does it have awesome rockstar ninja tech like Node.js?

I mean, if I don't have my event loops (event loops are web-scale, you see) and MangoDB ORM/ODM/object-state-propagator I can't be productive. (Gotta slam code for my startup!)

Also I heard Ada's type system was responsible for blowing up that Ariane V rocket. Clearly ninja-tech like JavaScript's weak/dynamic type system wouldn't have caused that.


> Also I heard Ada's type system was responsible for blowing up that Ariane V rocket. Clearly ninja-tech like JavaScript's weak/dynamic type system wouldn't have caused that.

Funny joke. It's worth knowing what really happened to the Ariane 5 though. There used to be some great discussions of it on Usenet but it seems like maybe Google has lost them. Here are the cliff's notes as I remember them:

* The root cause of the disaster was a management decision to re-use the Ariane 4 navigation system without any testing for the new rocket, on the grounds that testing is expensive and time-consuming.

* The Ariane 4 was a slower rocket than the Ariane 5 so numbers with respect to speed and acceleration were smaller.

* During launch, there was an integer overflow in a system that was only needed prior to launch and continued running through the launch for no reason. I believe it was code to do INS synchronization. The integer overflow couldn't happen on an Ariane 4 due to slower velocities.

* While that system wasn't necessary for launch, the overflow caused an Ada exception to be raised, which was uncaught and caused the whole navigation system to terminate.

* Once the range safety system (also written in Ada) recognized that the rocket was out of control it automatically terminated the launch to protect those on the ground.

MISRA C people immediately leaped on the disaster claiming that "Ada caused it," on the grounds that C code would have silently ignored the error. Ada's exceptions are similar to those in most modern languages and the "exception wars" have now pretty much been won by the pro-exception people, so the whole argument is pretty archaic.

Of course MISRA C and C++ are slowly beating Ada in the market even though they're an inferior fit for purpose because of the perception that the ecosystem is healthier.

I've also heard that the integer overflow was actually caught by the hardware itself, which generated a signal that the Ada runtime turned into a native exception. So had it been C code it wouldn't have silently ignored the problem, it would have terminated due to an uncaught signal.


I swear that every other code article on HN makes me want to learn Ada out of spite.

I just wish there was a more visible community of libraries it's hard to get into a language when you have to start at writing a CS 10* level of software due to lack of libraries for higher level/more interesting projects.


I used it for uni for our intro to data structure/algorithms course, and later on for a real time control systems course.

In both cases it was a good fit and the language was fairly pleasant to use, if a bit verbose and pedantic to my Ruby-and-Perl-accustomed brain.

It's certainly worth playing with.


I've got about 1-2 thousand lines of code lying about in tiny programs I've written playing with it, and I did enjoy it. I just never seem to have a size-able problem that's a good fit contemporaneous with the itch to learn it.

So a subleq virtual machine here, a markov chain there, but I've never managed to really sink my teeth in.


Sarcasm on HN is a subtle art, fellow snarkonaut :D

Too much and your posts turn grey. Too little and your comments won't be upvoted to the top.


From my experience: Too much == (sarcasm > 0)


Price one pays to be the Diogenes of code.


> Also I heard Ada's type system was responsible for blowing up that Ariane V rocket.

Please post proved facts, not wrong, misleading "I heard" FUD.


That's the joke.


Perhaps this can help: http://youtu.be/bzkRVzciAZg

(Unless you were being double-sarcastic, in which case this post is a fail)


Here's where I first read about it.

http://archive.eiffel.com/doc/manuals/technology/contract/ar...

EDIT: there's a reference link but I can't open it on my phone.


Today while programming in Javascript I found myself wishing for static typing and preconditions. Honestly. It'd have saved me a fair amount of time.

I ... I think this is what getting old feels like.


Older and wiser. Compilers and static typing are a good thing if you care about code quality and reliability.


At least on the server side I can use stricter languages. On the client I can do it only indirectly (I'm thinking of playing with TypeScript ... someday).


You should check out js_of_ocaml [1]. It's a very good compiler from OCaml to JavaScript which lets you interface with the DOM and existing JavaScript libraries relatively easily. You can play around with OCaml in the browser[2], which was implemented using js_of_ocaml.

[1]: http://ocsigen.org/js_of_ocaml/

[2]: http://try.ocamlpro.com/


Why not Roy or Elm? I've also seen references to Typed Clojurescript, which seems to be coming around.


I can't help you with static checking, but if you'd like a little runtime pre- and post-condition checking for JavaScript...

https://github.com/raganwald/method-combinators/blob/master/...


It is what it feels like when the amount of experience you have starts to pull alongside your tendency to buy into the hipster bullshit from people who have never written a decent piece of software yet figure they have lots of wisdom to share with us through their blogs.

Why is it always the fuckheads who can't program who feel they have to give you their advice? And why is their advice always "escape to <programming language du jour> and all your problems will disappear". If they knew how to program they'd be able to teach you how to program in the language you are already using.


One problem that Ada shares with Fortran is that a lot of the users out there are still restricted to old standards. Just like you still find some projects that have to code in Fortran 77, I found quite a few Ada books and guides where Ada95 is still the new kid on the block.

Let's see how that changes. One only has to think of C++, where for quite a while a lot of people urged strongly against template metaprogramming and other more modern features, basically sticking with a '90s C++, but now that C++11 out, everyone is really hurrying to get on the bandwagon again, just because a few of the new features are that good.

Looks like I'm spending my holidays with some statically typed compiled languages again. Might as well try finishing/redoing that RPG I started out in '94. Design notes must be somewhere, though I guess I won't have much luck with my backup floppies.


The sad thing is that Norman Cohen has decided not to update Ada as a Second Language for Ada 05. It's just about the best book I've ever read for any computer language.


For all those advocating Ada on this thread, could you recommend a good tutorial to us? I love learning about new programming languages, but particularly for a relatively-obscure language like Ada, I would appreciate a recommendation.


When I started in my CS program years ago, Ada was the teaching language (now I believe they moved to Java like everyone else). At the time I remember joining in the grumbling "Why do we have to learn Ada?! Who the hell uses Ada?" ...but now, looking back, it was a pretty good teaching language: You don't have to worry about little details like C, OOP, decent complier tools, etc.

I have 5 or 6 Ada textbooks still sitting on my shelf, which are now even further outdated. Maybe I'll go get the latest GNAT and play with Ada again to pretend I still use those books.


I have an Ada textbook that mentions in its foreward that it's appropriate that Ada was named after the first programmer because it will likely be the last major programming language. The book was written in the early 1990s.


I've done a lot of programming in PL/SQL, which was "inspired" by Ada.

And by "inspired" I mean it has the same chatty Pascal-descendent syntax and inline queries and that's about it.


Ada is a really nice, really effective language for being careful in, and yet compiling low-level and with a great deal of on-the-metal control, possibly more so than C without cheating and stepping outside the language. And yet, inexplicably, it never became popular. It can't be compiler support, there's GNAT and there has been for over a decade.


From someone who has never even ventured into object-oriented programming: Why Ada? From the Wikipedia level overview, it doesn't seem like it offers much over Java or C# (remember, I haven't touched any of the three). It does look to be quite a bit more readable, which I like, but I still would have a hard time justifying its use over languages that have endless libraries and strong communities with similar features/paradigms. I'm sincere about the question, and I hope this doesn't come off as snarky.


I _really_ want to do something productive in Ada. Its just that every time I sit down and look at it the pragmatist in me balks and I end up doing it in C or Scala. It reminds of ALGO 60. A Language that on paper should have been the goto language ( even had the same DoD support Ada had/has ) , but never gained traction outside a small niche.


Ada has Pascal-like syntax for sure. The designers were fans of Pascal so that was their starting point. Personally after using it for a while it really grew on me. I especially liked having := for assignment and = for equality.


Ada was the first language I ran into that would make guesses about your code (e.g. type of variable) and that scared me greatly. It was also fun to see the Ada compiler generate better code than the C compiler.


Which programming language wins the award for "Most Strongly (Statically) Typed"? How much of Ada's advantages for safety-critical systems is from language or runtime features not related to type safety?


I think this chart is a few years old, and scala and haskell look different (type holes, deferred type checks, simplistically, better "undefined" in haskell)

http://stackoverflow.com/questions/3165525/go-scala-go-what-...


Of relatively mainstream languages, probably Haskell or ATS. Ada is rather far, but its type system appears to be nowhere near as useless as C's or even Java's.


ISO has been bought and paid for by Microsoft in the past, they cannot be trusted anymore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: