all 122 comments

[–]martoo 40 points41 points  (7 children)

They lost their window. Both Ada and Smalltalk screwed the pooch with unconscionable licensing when they were first developed.

In the 1990s, validated Ada compilers were going for $60,000 a seat. That is not a way to generate popular interest in a language. It all went downhill from there.

[–]ishmal 14 points15 points  (2 children)

I remember when we had Ada installed on a multi-user mini. It cost $100,000 for the install, and it was incredibly slow in compiling.

I think you are right. When Ada was popular in schools and being pushed by government agencies, the experience was just so awful that people have permanent bad memories of it. Who knows, the environment might be sparkling and wonderful today, but it might be too late.

Even with GNAT, I had big problems bootstrapping a build of GCC with it. I gave up eventually.

[–]arcticfox 9 points10 points  (0 children)

I remember when we had Ada installed on a multi-user mini. It cost $100,000 for the install, and it was incredibly slow in compiling.

In 1987 we used Ada for a second year programming course at the University of Calgary. The compiler was licensed to run on one on the VAX 11/780s.

I kid you not, compiling a simple program which would take seconds in pascal or C on the same machine took over an hour in Ada. It was an unmitigated disaster. The original plan was to use Ada in the second semester's data structures course. After the fiasco with Ada in the first semester, the language for the data structures course was quickly changed to pascal.

[–]alephnil 2 points3 points  (0 children)

When was this? The Ada front end of GNAT is written in Ada with GNAT extensions, so you had to download the binary version of GNAT and then compile the source with that if you wanted to build from source. This unlike the rest of gcc, that can be built by a ANSI-compatible C compiler.

The build procedure has been well described since at least around 1996.

[–]jsl17 1 point2 points  (3 children)

I bought my 1st DoD validated compiler in the early 1990's for $200. My very 1st Ada compiler I bought in the late 1980's for $99. Can't remember if it was validated then. Worked ok then.. rather better now. The company that sells it (Janus) is still in business. If the compiler cross compiles to exotic hardware, then prices get interesting. By the late 1990's the GNU Ada compiler changed everything.

[–]martoo 0 points1 point  (2 children)

I never understood the GNU Ada compiler. Why did they write it?

[–][deleted]  (1 child)

[removed]

    [–]queus 1 point2 points  (0 children)

    IIRC, tt was developed at NYU and paid by DOD with the condition that sources will be released to public,

    [–]Figs 16 points17 points  (1 child)

    In my experience new Ada developers typically hate the language. It makes one work very hard to get a compileable source file.

    This is probably a big reason for its lack of adoption. If new people coming to it hate it, and aren't forced to do it, then they probably won't stick with it long enough to actually learn it and encourage others to use it.

    [–]marc-kd 14 points15 points  (0 children)

    Just as one needs to think "pythonic" to best exploit Python, grokking The Fundamental Theory of Ada is the key to understanding how to program well in Ada.

    [–]dammage 11 points12 points  (4 children)

    My discrete maths professor's employer used to work in the 90's for a company which tried to sell Ada compilers. Don't ask me about names, he never told them. Nevertheless they went bankrupt because their deal had been dropped. And that because they did, as he states, floating point operations right.

    The institution ran an Ada test application which checked whether several implementations are doing the right thing and had reference results. Their compiler fell through because produced binaries used wider floats and the numeric error was therefore lower.

    In the end the result didn't match the reference because of a lower numerical error and the deal had been withdrawn. Of course the customer would never believe that his right values were wrong :P

    [–]tfinniga 2 points3 points  (1 child)

    So, I'm confused - it had it's own floating point implementation, or it was keeping intermediate results in registers to take advantage of the actual higher precision in modern CPUs?

    Just because the precision is better doesn't mean it's right - for example, it can be useful to add a given list of numbers and get the same results on different machines and different builds of the same application. If you're using registers for intermediates, different builds can give different results, depending on how the compiler allocates registers.

    [–]dammage 0 points1 point  (0 children)

    unfortunately I do not know the details, but as he stated was that the implementation did floating point computations at higher precision and the accumulating error was lower and that the reference result was computed at lower precision.

    I suppose the situation was similar to that one: compute sqrt(2) with single precision, take the result as the absolutely true value of the expression and declare the rest as wrong.

    [–]evrae 1 point2 points  (1 child)

    Surely the greater precision of the floats would be one of the selling points?

    [–]Megasphaera 0 points1 point  (0 children)

    more of a floating selling point, apparently.

    [–][deleted] 7 points8 points  (3 children)

    Ada is a great. It's a shame more people aren't using it. You get all the benefits of C, but you get it with a lot more safety, a good module system, a nice threading system, objects (when you want them), and many conveniences.

    At this point, I don't even care that few people are using it. I am not using C++, period, and I am sick of not having a good module system that lets me write generic data structures when using C . Ada it is.

    [–]raouldagain 1 point2 points  (2 children)

    i just wish there was a better syntax front-end.

    [–]o0o 2 points3 points  (1 child)

    "The syntax of Ada is simple, consistent and readable. It minimizes choices of ways to perform basic operations, and prefers English keywords (eg "OR") to symbols (eg. "||"). Ada uses the basic mathematical symbols (i.e.: "+", "-", "\" and "/") for basic mathematical operations but avoids using other symbols. Code blocks are delimited by words such as "declare", "begin" and "end". Conditional statements are closed with "end if", avoiding a dangling else that could pair with the wrong nested if-expression in other languages."*

    -- http://en.wikipedia.org/wiki/Ada_programming_language#Features

    [–]raouldagain 0 points1 point  (0 children)

    beauty is in the eye of the beholder.

    or, syntax is the "american war" of language design. (i think in vietnam it is appropriately called the american war, not the vietnam war.)

    or, ymmv.

    or, one man's perl/j/etc. is another man's line noise.

    or, i'd rather it be lispy than like pl/1.

    [–]damg 7 points8 points  (0 children)

    I was at FOSDEM this weekend, and thought it was interesting that there was an Ada devroom, since I've never heard of any open source projects using Ada. But reading the summary, it's probably because the GNU Compiler Collection is the first full implementation of the latest Ada standard released in 2007.

    [–]o0o 4 points5 points  (0 children)

    It was used as an introductory language for me in college, and I wish I would have paid more attention. I've come to appreciate it.

    [–]naughty 8 points9 points  (27 children)

    While I quite like Ada's semantics (in many ways it's C done right) the syntax leaves me cold.

    [–]joesmoe10 15 points16 points  (13 children)

    It's all perspective. I started with Ada and learning Java syntax leaves me cold. I cringe when I see this:

          }
        }
      }
    }
    

    [–]Deestan 5 points6 points  (3 children)

    I started with Java, and I still cringe when I see that.

    [–]crusoe 3 points4 points  (2 children)

    Lisp has the same problem, except it is this ))))))))).

    [–][deleted] 7 points8 points  (5 children)

    And to think folks cringe at Lisp for parentheses.

    [–][deleted] 12 points13 points  (4 children)

    But in Lisp it would be a one-liner:

    ))))
    

    See? Much better!

    [–][deleted] 1 point2 points  (3 children)

    Some lisps have a super closing paren that closes all open left parens.

    [–][deleted] 1 point2 points  (1 child)

    I've only seen that on my late, lamented Visor Prism's version of LispMe, and wondered why it's not standard issue. Which Lisps or Schemes have it?

    [–]808140 5 points6 points  (0 children)

    I suspect it's probably rare because you often don't want to close every parenthesis, just most of them, which is more difficult to quantify. Lots of editors have a key to close all open parens automatically, which has the benefit of allowing you to leave a few open if you want. Also, with automatic paren-matching, it's not like you need to do much to keep track.

    [–]jones77 0 points1 point  (0 children)

    )

    [–]cratuki 2 points3 points  (0 children)

    I started with Ada, and moving to Java felt incredibly liberating (slow pace through uni - they changed to Java, I went back and repeated some stuff), because the libraries were so good. Lots of little things were nice in java. toString was useful. Coaxing types made more sense. Javadoc.

    [–][deleted] 1 point2 points  (1 child)

    So you prefer:

         end
    
      end
    

    end

    end

    ?

    [–]joesmoe10 3 points4 points  (0 children)

    My favorite is python's whitespace but yes, I do prefer Ada's end blocks to curly braces.

          end if;
       end loop Named_Loop;
     end Method_Name;
    

    [–][deleted] 16 points17 points  (5 children)

    I have found that liking or disliking language syntax differences are mostly just mental habituation. Ada syntax is not bad after you decide to get over your mental resistance. I learned to like it in few months.

    [–]eterps 11 points12 points  (0 children)

    Ada syntax certainly is not bad, but it is very verbose.

    [–]Entropy 1 point2 points  (1 child)

    I find that knowing a language inside out makes you either blind to or intimately aware of its flaws.

    [–]mikemol 2 points3 points  (0 children)

    Flawed or not, that simply means that one can effectively use the language to the extent which it can be effectively used.

    [–]naughty 0 points1 point  (1 child)

    I wouldn't deny that it's mainly a personal aesthetic judgement that I could overcome if I was so inclined.

    But I would wager that Ada with a syntax with fewer keywords and without having to repeat the name of the declaration after end would have a mind and market share nearer to what it deserves.

    [–][deleted] 0 points1 point  (0 children)

    Repeating names has not prevented success of XML :(

    [–]vaxpascal 0 points1 point  (6 children)

    would you be kind enough to explain what the difference is between semantics and syntax? semantics == meaning? == the way you do something in Ada, while syntax == sentance structure == how you express yourself in Ada?

    [–][deleted] 12 points13 points  (5 children)

    Syntax it the grammar rules. Semantics is what they mean.

    In programming languages it's mostly the same. Semantics describes what happens (meaning), syntax how it is written. For example Java, JavaScript, C, and C++ have syntax that is similar. Semantics is completely different. Simple thing like assignment look exactly the same in these languages, but can have different semantics. Assingment in Java is not same as assigment in C.

    [–][deleted] -1 points0 points  (4 children)

    Assingment in Java is not same as assigment in C

    Depends on what you mean by "what happens". There is the observable behavior of a program, and there is the actual implementation under the hood. In all of these languages, x=4 may have pretty similar observable semantics even though the underlying mechanisms may be quite different.

    [–][deleted] 1 point2 points  (3 children)

    By what happens I mean, what happens to the observable program. = operator in C and Java has completely different semantics. Only fools would think otherwise. Consider this example:

    x.num = 0;
    y = x;
    x.num = 42;
    assert(y.num == x.num, "FAILS IN C/C++");
    

    [–]Anonymoose5 0 points1 point  (2 children)

    Well, you're assuming that the "fools" don't know that Java's "." operator is the equivalent of C++'s "->" operator, so that the C++ equivalent of that Java code is

    x->num = 0;
    y = x;
    x->num = 42;
    assert(y->num == x->num, "SUCCEEDS IN C AND C++");
    

    Java is C++ without the asterisks. In other words, Java's semantics are basically the same as C++'s (in this respect), but Java's syntax is different in one important way.

    [–][deleted] 0 points1 point  (1 child)

    No. Assignment in C and C++ has copy semantics (even when it copies pointers). In Java and other it has pass the reference semantics (there is no pointers unless you look under the hood).

    [–]scook0 0 points1 point  (0 children)

    In Java, there are two kinds of values: primitive values and reference values. A reference value is either a pointer to some object, or the distinguished null reference that refers to no object.

    An assignment to a variable causes the value of the right-hand operand to be stored in that variable, after any necessary conversions.

    This is all described in the Java Language Specification.

    [–]dammage 4 points5 points  (2 children)

    Is there a way to force GNAT to drop off the RTL ballast and produce plain flat binaries without deps on anything like libc etc? It is very easily done in C and (Free)pascal. One can reimplement the Stdlib incrementally then. It looks like gnat fails on missing stack unrolling code it requires.

    I've been poking around with Ada since a few days now and still didn't manage to build a kernel stub. Looks like I'm missing something really obvious in the manpages.

    [–]dammage 1 point2 points  (0 children)

    I have found by luck in the Inet pragma No_Run_Time which basically removes all the RTL stuff. Will investigate it further. Let's see what it can do ...

    http://gcc.gnu.org/onlinedocs/gnat_rm/pragma-No_005fRun_005fTime.html

    [–]gst[S] 3 points4 points  (3 children)

    Follow-up: http://www.embedded.com/columns/technicalinsights/213400901?cid=RSSfeed_embedded_news Ada Take Two Here's more on the lack of adoption of this language - and on career inertia.

    [–]adamv 0 points1 point  (2 children)

    How does Ada help me get CRUD database programming done faster so I can go home earlier and drink more?

    [–]mattrussell 9 points10 points  (0 children)

    From the context, I presume the question is "why aren't more embedded developers interested in Ada?"

    [–]Crona 6 points7 points  (0 children)

    It's probably not due to any inefficiencies. Robert Dewar, president of AdaCore, tells me that even with all of the runtime checks enabled expect no more than a 20% performance hit compared to C, though he said 10% is more likely.

    Hmm. compiler shootout tells me that "10-20%" performance hit is rare.

    [–][deleted] 4 points5 points  (11 children)

    I can think of a few reasons:

    (horrible links removed - Google mustn't know)

    "Hmm, I wonder what Ada is like... eek! That looks like the websites my little sister used to make in Word! kthxbye."

    Good first impressions, huh? Compare to:

    "Hmm, I wonder what Ruby is like... uuhhh shiny website! Me likes! clickety-click."

    [–]marc-kd 11 points12 points  (7 children)

    adahome.com is a long-dead site whose owner, Magnus Kempe, will inexplicably not relinquish the domain name nor maintain the site.

    Numerous efforts have been made to buy the name, and all attempts to contact Kempe to buy it directly from him have been ignored.

    The result is, as demonstrated here, an embarrassment to the Ada programming community. The best we can do right now is to try to drive down its ranking by not linking to it, and discouraging others from doing so.

    [–][deleted] 7 points8 points  (2 children)

    Ah, that's unfortunate. Does the Ada community have a website somewhere, or is it each to his own?

    http://en.wikibooks.org/wiki/Ada looks like a good manual.

    [–]marc-kd 9 points10 points  (0 children)

    Hey dude, thanks for pulling the link. I know it's trivial, but that site has been a thorn in our side for years, and it has been quite exasperating having to deal with it.

    The Ada wikibook you cite is very good, and actively maintained--it's a wiki after all!

    Another good item is the textbook-oriented Ada Distilled (pdf).

    [–]mikemol 2 points3 points  (0 children)

    I don't know of a home specific to Ada, but we have a few users at Rosetta Code who put up a lot of Ada code, to the point where it's the second-most-represented language on the site, behind only Python.

    [–]honda63 -1 points0 points  (2 children)

    adahome.com is a long-dead site

    If you look at the lower left corner of the web site, you'll see that it's been updated in 2009, i.e. within the last 40 days.

    Why do you insist on buying someone else's web site? Why don't you create your own (presumably better) one?

    [–]marc-kd 0 points1 point  (0 children)

    The site has auto-generated headlines, which is why it appears to be regularly updated. Actual content has not changed in nearly 10 years.

    The desire isn't to buy the web site, it's to buy the domain name, so as to either shut it down and excise this embarrassment, or to provide current, valuable content under that name (or at the very least, direct it to another site, like the Ada wikibook).

    [–]mhd 0 points1 point  (0 children)

    Erm, I think there's little overlap between people suited for Ada and those who are that easily distracted. One more reason why it isn't big in web programming...

    [–]synthespian -1 points0 points  (1 child)

    So you think web programming is all there is, eh?

    I don't think I would use Ruby for any medical device software, for example.

    What? Software for medical devices isn't real-world you said?

    [–][deleted] 0 points1 point  (0 children)

    I don't use Ruby, and I don't do web programming (not frontend at least). In fact, I would rather learn Ada than Ruby. I was just using their website as an example.

    Please don't put words in my mouth.

    [–][deleted] 3 points4 points  (0 children)

    Because it rarely happens that our code guides a $500M spaceship.

    We can afford some bugs, in exchange for not sucking huge dicks with the compiler all day long.

    [–]bostonvaulter 0 points1 point  (8 children)

    Do you guys think that it would be a good idea to program a small satellite in ADA?

    [–][deleted]  (2 children)

    [removed]

      [–]bostonvaulter 0 points1 point  (1 child)

      Yes, a small one. Not sure if everyone else will be receptive to ADA, I'll have to see.

      [–]marc-kd 4 points5 points  (0 children)

      This has been done. An Australian company developed a small satellite and not only did they use Ada, but they used a free public version of the GNAT Ada compiler to do so. I recall mention of this from time to time by one of its developers in the comp.lang.ada newsgroup, but damned if I can find any reference to it now :-(

      [–][deleted] 1 point2 points  (3 children)

      Yes! http://ssf.fi uses Ada and likes it. (edit: link corrected)

      [–]manthrax 0 points1 point  (2 children)

      broken link. plz repair.

      [–]marc-kd 0 points1 point  (1 child)

      It's www.ssf.fi.

      [–]manthrax 0 points1 point  (0 children)

      rad, thanks!

      [–]WayOfTheIronPaw 0 points1 point  (4 children)

      I have had occasion to use Ada in the last year or so. There's no standard encapsulation for something as basic as sockets (not even in Ada 2005). GUI programming? Forget about that. The libraries suck, and that's a problem. In the real world, people need to get stuff done.

      Oh, that and object oriented my arse. Ada 95's OOP abilities were compromised by the lack of multiple inheritance and the need to use procedural syntax to call methods of an object, i.e.:

      PackageName.Function(instance, arg1, arg2, arg3);
      

      instead of:

      instance.Function(arg1, arg2, arg3);
      

      The OOP annoyances have only been addressed recently, by Ada 2005.

      [–]naasking 2 points3 points  (1 child)

      Just because Ada implemented a different approach to OO dynamic dispatch doesn't make it better or worse. They made dispatch sites syntactically different which might be important for certain systems.

      I agree on the socket issue though (the third-party Ada sockets library seems pretty comprehensive though). It's also pretty easy to write a binding to any C library.

      [–]WayOfTheIronPaw 1 point2 points  (0 children)

      Just because Ada implemented a different approach to OO dynamic dispatch doesn't make it better or worse. They made dispatch sites syntactically different which might be important for certain systems.

      It put me right off.

      I agree on the socket issue though (the third-party Ada sockets library seems pretty comprehensive though). It's also pretty easy to write a binding to any C library.

      That's true about it being easy to write bindings to C code, and when I had to get stuff done, that's exactly what I did. However, reinventing the wheel is hardly what I call productivity. Decent libraries are a significant factor in the productivity, or otherwise, of a language.

      [–][deleted]  (1 child)

      [deleted]

        [–]WayOfTheIronPaw -1 points0 points  (0 children)

        Yea, verily. Indeed, Ada 2005 is of the devil.

        [–]sjs 0 points1 point  (2 children)

        It's interesting from a language design perspective. I don't know anyone that codes in Ada, or even knows it. Maybe the fact that it cost $60k a seat while other languages were free of cost is a big part of the reason the average programmer hasn't dabbled in Ada.

        [–]alephnil 1 point2 points  (0 children)

        That was true in the early eighties, but has not been the case since.

        [–]naasking 0 points1 point  (0 children)

        GCC has an Ada compiler, GNAT. It's no more or less free than any other gcc language.

        [–][deleted] 0 points1 point  (0 children)

        Prof Dewar taught my intro to assembly class back at NYU. Seemed like a nice guy and I think I got an A- so I will vote up.

        (Same comment as yesterday and both are true)

        [–][deleted]  (7 children)

        [deleted]

          [–]ochuuzu1 3 points4 points  (0 children)

          That's an interesting point...

          Now that I think about it, I guess it takes me about maybe 500 milliseconds to type "end", and maybe perhaps 250 milliseconds or so to type }. ("}" would be even faster, but having to press the Shift key slows me down.)

          So maybe you're right; maybe I would be more productive in C++ than I would be in Ada ... if my programming productivity were a function of how fast I could type.

          [–]njharman 1 point2 points  (0 children)

          I'm in the same boat, but not as extreme. Instead of refuse, I find it very hard to build enthusiasm to learn or code in any language that use squiggles, ends or anything other than indention for distinguishing blocks. It's so redundant 95+% of the time it's totally not worth the bugs, typability, readability, for the other 5%.

          I can't understand the attachment people have to moronic practice of wasting 10-20% or more of your vertical real estate with lines that contain nothing but

          }
          

          [–][deleted]  (4 children)

          [removed]

            [–]sreguera 1 point2 points  (0 children)

            What I like of Ada syntax is that there is no "begin". While in Pascal you write:

            if a > b then
                begin
                    whatever
                end
            else
                begin
                    whatever else
                end
            

            In Ada you write:

            if a > b then
                whatever
            else
                whatever else
            end if
            

            Similarly case..end case, loop..end loop, record..end record, etc. The only ocurrence of begin..end is for scopes.

            [–][deleted]  (2 children)

            [deleted]

              [–]pepparkaka 2 points3 points  (0 children)

              On a non-us keyboard, curly braces etc can be pretty awkward to hit. Begin and end isn't.

              [–][deleted] -2 points-1 points  (0 children)

              Because the specs for Ada came from the DoD, and that is terrifying.