Live data from Hacker News

Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

seas.gwu.edu

51–60 of 74 posts

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#51
post #25

This is certainly an impressive list of projects. Ada seems to be favored for critical software that can't ever fail. I've been considering how to achieve this type of software reliability for more "enterprisey" applications. Formally verifiable languages are certainly intriguing, but would be a hard sell for the managers at the Fortune 100 company where I work. Reading the wikipedia page for Ada didn't really give m…

It has a lot of safety checks built into the runtime, which make it a little slower. x is and int between 1 and 200. x gets asigned out of that range, exception is thrown. So we weren't manually checking everything. Also I think it was mandated as a language for US government contracts, for a variety of reasons.

As with asserts in C, you can compile with that turned on or off.

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#52
post #22

Earlier quoted context omitted.

C++: numeric_limits ::max ()

Ada attribute provide a lot more meta information about types and objects than just integer limits. http://en.wikibooks.org/wiki/Ada_Programming/Attributes Some of these would be methods in modern OO languages but many are unique to Ada.

So does C++; both C++ and Ada have traits the other doesn't. Good ideas go around.

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#53
post #10

Wow, I went to GW and learned Ada in CS051. I didn't have much of a point of reference at the time to compare it to other languages, but it was pretty easy to learn and I enjoyed the class.

I am class of 05 so my intro class was the last one to use ada. I also remember it being very easy on beginners. At the time I was annoyed the underclassmen got java, but now that I know java, no thank you.

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#54
post #9
post #7

Although I've never coded in Ada I have had to read existing code to figure out what it was doing. Ada struck me as a language that would be a pain to write in(at least it would take a long time) but it was a pleasure to read. Even without an intimate knowledge of the language (I was a C++ guy) I was able to figure it out.

Alternative to Ada is often writing Ada in some other language more painfully :( I think it's sad that companies move to restricted C/C++ subset just because there are more people with C/C++ in their resume. 1. The JSF air vehicle C++ coding standards http://www.stroustrup.com/JSF-AV-rules.pdf 2. MISRA-C:2004 Guidelines for the use of the C language in critical systems http://caxapa.ru/thumbs/468328/misra-c-2004.pdf…

Why cant they just learn ADA?

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#55
post #7

Although I've never coded in Ada I have had to read existing code to figure out what it was doing. Ada struck me as a language that would be a pain to write in(at least it would take a long time) but it was a pleasure to read. Even without an intimate knowledge of the language (I was a C++ guy) I was able to figure it out.

it's verbose, but I guess a good IDE would write a lot for you anyways. When it's statically typed the IDE can help you a lot. It touches the difference between what you want to read and what you want to write in software, but nowadays, stuff doesn't have to be written, it can be conveyed with color, font, underline etc. But the real shocker is that you can't really write serious Ada for free, gnat is a pain, the fre…

Try Visual Basic, it's pretty similar.

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#56

The attribute mechanism is something a lot of languages would benefit from. Need to know the maximum value of an integer? Just ask the integer type to tell you. No going to a library to look up inscrutable constants.

In C# you have Int32.MaxValue. I always assumed it was pretty standard everywhere. Btw, Ada is on my list of languages to learn since 2011. I guess I will put it first on the 2015 good resolutions list :-)

When you get started, here are the two books that seem to get recommended the most frequently:

Ada as A Second Language: http://amzn.com/0070116075

Programming in Ada 2005: http://amzn.com/0321340787

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#57
post #45

Earlier quoted context omitted.

Hmm? Ada uses the apostrophe for character literals and to introduce attributes. Strings are arrays; indexing uses the same `array[index]` syntax as any other array. S: constant String := "Hello"; H: constant Character := S(1);

True, I was thinking about type conversion from String to Character, IIRC you have to use ' operator, something like my_string'first (not sure, I needed it 10 years ago), otherwise my_string(1) gives a String of length one, not the first Character.

Depends on how the array is defined. Ada allows you to have any discrete type as your array indices, so to get the first element of an array, you need to use my_string(my_string'first).

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#58

I used Ada during my first internship (avionics software). However, the group I was part of was in the middle of phasing out Ada in favor of C/C++. This was around 2010-2012.

Similar for me. My first ever programming assignment for a real company was converting an Ada project to C for the Boeing 787.

How was your feeling about the C codebase compared to Ada? Did one feel more comprehensible or reliable than the other?

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#59
As a college student, is Ada still worth learning for (Canadian) development jobs in critical systems? I'd like to think it would give me an edge coming out of school, but I keep reading that new applications are being written in C/C++.

Edit: In fact, I interned at an avionics company and they're slowly trying to entirely switch to model-based development, using certified software that generates the code for you.

Re: Who's Using Ada? Real-World Projects Powered by the Ada Programming Language

#60

The attribute mechanism is something a lot of languages would benefit from. Need to know the maximum value of an integer? Just ask the integer type to tell you. No going to a library to look up inscrutable constants.

In Haskell, you have typeclass values. In other words, generic values.

    class Bounded a where
        minValue, maxValue :: a
So it is always the same constant, and it just changes value by what its type context is.
Post reply on HN