Why do you keep using Ada?

Hey everyone! I’ve been using Ada for over a month now and I’ve been really enjoying and I wanted to connect more with the Ada community so I wanted to ask. How long have YOU been using Ada and what do you like about? I’m curious what people who have been using it way longer than me have to say about this awesome (and VERY underrated) language.

4 Likes

I wrote avionics software for two helicopters in a big team.
Later I ported the original avionics (big endian, Ada 83) to a new compiler of a different vendor on different hardware (little endian, up to Ada 2012) for a real time flight training simulator. It was amazing how fast this was.

7 Likes

Disclaimer, I am not a professional programmer.

  1. Because it is fun to do things with it. I do not write code so that I can write code. I write code to do fun stuff and Ada just gets out of the way. Other languages are complex, require me to reason quite heavily, force me to think in the language-space rather than in my-problem-space.
  2. Because it is brutally easy to debug. I once found a stupid error in a library (un-initialised variable) in a matter of 20 mins. This is huge. The library was several thousands of lines of code I had never seen. I only had to give it input and it gave me outputs. But with a specific, correct input, it crashed. I found the offending line in 15 mins thanks to Ada’s check and arithmetic. Had it been any other language, it would have produced a garbage output and I would not have noticed it until several hours or days into my project (the output was not meant to be read by humans, it was automatically generated code).
  3. Because it made me learn a lot. I learnt more about low level code with Ada than C. I learnt more about types than any other languages.
  4. Because the community is super cool and knowledgeable.
  5. Because it is rock solid and well designed.
  6. Because it has features other langs can only dream about, such as type predicates, contracts and SPARK

I hope this answers your question ^^

10 Likes

I don’t get to use Ada in my professional life as much (most things are done in C, but I try to sneak in some Ada when I can), so most of my Ada use these days is fun stuff at home.

For me it’s just a fun language. I like most things about it (there’s definitely some pain points for me, but they are minor), but I like how a well constructed package looks and feels. I like the type system, how enums are utilized, and the unique tasking system among other things.

9 Likes

This is my personal list of why I learned the language in 2021ish and keep coming back to the language.

  • Simple rules, clear syntax (easy to learn, and I’ve come back years later to a project and was able to pick it right up again)
  • Ranges on types ('first, 'last, 'pred, 'succ, 'range)
  • Super-powered enums ('first, ‘last’, 'pred, 'succ, 'value, 'image). Built-in to-string and parsing of enums, and you can use them as array indices.
  • Pre/post conditions
  • Package instead of class-level encapsulation. Packages cut up subproblems at the domain level, not at some arbitrary software architecture level, so I get fewer getters/setters in tightly related code, fewer “God classes”, and keeping related types/functions together prevents ravioli code.
  • Spec/implementation separation emphasizes “Why am I writing this?”. Specs prevent the need to code fold and combines the public interface of a module and makes it explicit.
  • Good low level control (bit representation, compiler intrinsics, ASM, easy import from C)
  • Ease of creating semantically different primitives (e.g. type Foo is new Integer). Helps with units and preventing data from flowing between systems without being cleaned.
  • Named parameters and aggregates
  • Access types and aliased make “pointer” semantics much more direct
  • Operator overloading when I want it (i.e. math code)
  • Explicit generics show the cost and slow down “generify all of the things” you see in other languages
  • Scope-based types (controlled types) for auto cleanup
  • Alire (95% of the time, I don’t need to mess with the build)
  • SPARK (opt-in verification)
  • Mostly easy-to-use standard library
  • Environment startup task lets you explicitly control system startup before the program enters the entry point.

tldr;

Ada makes it easy to write the right thing the first time, even for low level code.

11 Likes

We can enumerate the many benefits all we want, but I think it all boils down to
Ada simply being an excellent tool of engineering.

5 Likes

Because I’m a masochist. It takes me 3-5 times longer to write and debug an Ada program as it does C++/Fortran/Python/Java/C#/TCL/VBA. Sometimes, one syntax error can get me bogged down for half a day. Basically, I haven’t rearranged the problem in my design to do it the Ada way. I’m still in C++/Python mode.

I keep using it because I’d like to think Ada and speed up the development time instead of thinking in another language and then translating and having to rethink the problem and recode it the Ada way. It gets easier once I’ve worked out the whys and the hows.

3 Likes

I like Ada because it supports the way I think as a software engineer.

I think all software should be correct. I use Ada because it is the best language for creating software that is correct, as shown by its long record of use in domains where the software must be correct.

My experience is that creating correct software with Ada takes less effort than creating incorrect software in other languages.

7 Likes

My experience is that creating correct software with Ada takes less effort than creating incorrect software in other languages.

I feel the same. Strongly and stactical typed language makes it harder to have a program which compiles… but once it compiles, it is often OK.

4 Likes

Because it’s the best language, better than C and Rust for embedded, better than Go for memory control and language design quality and reliability (Go shines at throwing people into short projects). Better than Rust at basically everything (I’m only not sure about concurrency performance but certainly concurrency safety on a standard runtime). I’m also now invested somewhat and whilst Zig looks interesting, I haven’t actually investigated and I doubt it comes even close to what Ada SPARK offers.

6 Likes

6 Likes

I do a lot of embedded development, from real time industrial devices to 8-bit microcontrollers. It’s the only language (outside of Forth on MCUs) that I don’t have to convince it that I want to do low level embedded stuff.
And the tasking capabilities, warts et al, are still heads above any other programming languages.

6 Likes

Welcome to the forum @tcoram!

1 Like

And excellently engineered. It may have done some things differently with hind sight or maybe just today (UTF-8 dominance) but the language is all exhaustively well considered and engineered, which is rare and perhaps unique.

2 Likes

I believe Dewar called it a “real marvel of engineering”.

They set out to create the best language ever deserving to replace all other languages. Personally I think they achieved it. I guess the fact that the D.O.D. isn’t saving as much money from using Ada as they should be is largely a social problem and not a technical one. Perhaps the NSA didn’t actually want everyone to use a secure language too like they didn’t want people using cryptography (Bernstein vs United States) :wink:.

1 Like