Slashdot Mirror


Why Not Ada?

David M. Press asks: "Why is it that Ada 95 is not in greater use in Open Source projects? It can compile to machine code or java bytecode, it has built-in tasking (threading), it supports both the procedural and object-oriented paradigms, and it is very human-readable (based off of pascal syntax). And best of all, the GNAT project (based off of GCC) provides a fully conformant Ada 95 compiler for multiple platforms. What more can you ask for?" Good point. Is Ada just a victim of obscurity or are there real reasons not to use it?

6 of 81 comments (clear)

  1. Several reasons. by jd · · Score: 3
    First, ADA is =so= complex, that until recently there WERE no "complete" ADA compilers. This meant that you had lots of ADA dialects, each a subset of the "real" ADA language, and that a program that worked on one dialect might not even compile on another.

    Secondly, ADA compilation is slooow. This is inevitable, when you have a language that supports typing after the fact, amongst other obscure but powerful features.

    Thirdly, nobody has ever really promoted ADA, other than the DOD. And what geek in their right mind would trust a super-paranoid organisation, when it's telling you that something is for your own good?

    Fourthly, nobody but nobody has written a decent optimising ADA compiler. Nobody knows how! There has been almost zero research into 3.5th generation languages and how to tightly optimise the generated code.

    Fifthly, until GNATS came along, many ADA compilers cost as much as the machine they were to run on. Microsoftian in the extreme! Anyone with any sense would have said no to the ADA tax. (The COBOL tax is even worse! And COBOL is an all but dead language!)

    Sixthly, nothing interesting has been written in ADA, so geeks, nerds and coders have no incentive to grok it. (If someone were to port the Linux kernel to ADA, I'm sure interest in it would sky-rocket.)

    Lastly, too many bad memories of lecturers who keep their brain cells in their tuna-fish sandwich, telling people that the best way to debug a program is to throw in more exceptions. Sorry, but if the program was written sensibly in the first place, there would BE no exceptions. Exception-handling is a way to write sloppily, with no understanding of what you're actually doing.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  2. The real reason by FigWig · · Score: 3

    The reason people don't use Ada is because its blocks are delmited by indentation. Every knows that's just ugly. Real hackers would use a language like Python instead.

    That and it's named after a girl.

    --
    Scuttlemonkey is a troll
  3. Things are getting better... by zmower · · Score: 3
    We now have Ada95 output from GLADE targeting the GtkAda binding.

    I have both Ada and C experience. Ada thrashes C for non-trivial programs. Maybe the problem is that most open source software starts out as trivial programs that scratch a programmers itch.

    C++ and Ada95 are roughly equivalent. To my mind C++ suffers from its class-centric view of everything. Look at the hassles C++ has with singletons while Ada neatly solves this with the package structure.

    adapower is a good place to start for those interested.

    --

    Sig pending!
  4. You Choose... by Skweetis · · Score: 3

    Ada.Text_IO.Put_Line(Item => "Hello, World!");

    -- OR --

    printf("Hello, World!\n");

    Ada95 source code takes up twice as much disk space as C source! All joking aside, I don't use Ada because there aren't very many library bindings for it. GNAT is a pretty good compiler, though, and Ada fixes a lot of problems inherent in C, but Ada probably just isn't used because C/C++ are the established languages of choice for programming on Unix/Linux systems (most of the OS being coded in C).

  5. Culture by remande · · Score: 4
    A lot of people have given a lot of technical reasons for not choosing Ada. However, I think that there is one, larger reason for this. Ada has been considered beneath contempt by most geeks since before most geeks were coding. It's one of those things that we are supposed to hate as a matter of culture. I've read a bunch of stuff about how it is built by committee with all the problems thereof, but I've never actually seen it, and I can count on one hand the number of people I know who have used it.

    If you don't hate Ada and COBOL, you get shunned by hackerdom. You are allowed to code in either, but must swear loudly while doing so. People who actually choose to generally get discounted as idiots.

    I'm not saying that the above is right, but only that the above is so.

    --

    --The basis of all love is respect

  6. GNAT by CFN · · Score: 4

    Having done my undergraduate CS at NYU, the 'N' in the Gnu Nyu Ada Translator (GNAT - how many people knew that), and having studied under two of the developers of that system (their company's site) I was fortunate enough to be exposed to virtues of this language.

    The Ada syntax is very similar to Pascal's, but the language is very similar to Java (especially thread support). Once you get accustomed to using the language, you notice that you can be very, very productive using it, much more than in C++. I would also say that the learning curve (minus the time to familiarize yourself with the syntax if you are coming from the C/C++ world) is pretty easy to climb, and you can be proficient at it soon.

    For my compiler class, we needed to write a compiler for a (the non OO) subset of Ada95. I chose to write mine in Ada95, because we were allowed to use the GNAT lexer/parser (which was written in A95 as well). I would strongly recommend that anyone wanting to learn large scale programming or who is developing something that will be open source, should take a look at the source code. It is clearly written, well documented, easily understood, and even beautiful. It is a wonderful example of how someone should write code if the expect others to read it. It also shows just how beautiful and understandable the language is.