Ada or Rust ?

Posted on April 11, 2020 in Software

A few months ago, I realized that I've been messing with the C for years. The big advantage of the C? Everything is possible. And that's the problem. Almost no checking is done at compile time. Errors pile up much faster than you think. Arrays that overflow, pointers that wander, memory areas that are unallocated but still used, etc., etc.

So I started looking for a replacement. I quickly found Rust. There is a lot of hype around this language for some time. It's the trendy language. So I let myself be tempted. Especially since the official speech announces a secure language and other joys. I started the tutorials on the official website. Ouch, it stings. The learning curve is steep. But I got hooked. And since I work on the subject in my spare time, I don't move fast. And then one day, a new version of Rust is released. New version with... incompatibilities with previous versions. WHAT?!? What I just learned is not fully usable anymore? And a few weeks later... again. By digging a little more, I realize that the Rust language, although more and more used, is under development with big gaps. Cold shower. What I want is a stable language, well specified, a good investment that will last in time.

And then, by chance, I came across Ada again. For me, Ada was a language reserved for aeronautics, space, nuclear power plants... Heavy stuff. But I did my research on the current situation regarding this language. And it has changed a lot since the 90s. Ada is still used in the above mentioned domains but, apparently, it is also used in many other domains, including instrumentation. So I have been looking at the Ada case. Already, the basic syntax is already known to me since it is very similar to the one of VHDL [1] that I have been using for a long time. Then, if there are several versions of the language, they are are very strongly compatible between them. Finally, the language is standardized. A program written in Ada is likely to have the same behavior whatever the the compiler. Ada is a strongly typed language. This is what makes it strong. As a result, it is possible to define its own data types in a very advanced way. I liked a lot of what I read about Ada. So I started to learn Ada. Aie aie aie ! It stings a lot. The learning curve is really steep. The language is really complete. So, it takes a long time to learn it. And each version of Ada adds another layer. But the more I learn, the more interesting I find the language.

Conclusion : I'm going to continue my learning of Ada. I don't know if I'll use it one day at work (C is hard) but I'm doing it at least for my personal satisfaction ;)

[1]The designers of VHDL have based the syntax of this language on that of Ada.

Translated with (free version)