After some search for programming languages which promise to reduce the number of bugs, I decided to give Ada (2012) a try.
I like it better than C and C++ and the compiler is included in Debian in a reasonably recent version that it can compile the code that I need.
Ada is particularly nice for programming RPI 2040 microcontrollers because for my needs I didn't need additional libraries. For both of my RPI 2040 projects (one of which is online here: https://masysma.net/37/dcf77_vfd_raspi_clock.xhtml), my code had fewer bugs than I had anticipated.
For general purpose systems programming the lack of free software libraries is still a concern e.g. while working on a custom backup restore program I had to write my own LZ4 extractor and Blake3 hash function implementation because there wasn't any existing libraries that I could find for the purpose.
In my experience it is trivial to call out to C libraries from Ada. You run a tool to convert the header file to Ada syntax, you link in the C library, and then you call the C code as if it were Ada code.
That's probably why you don't find LZ4 and Blake3 libraries. You forgot to look for the C libraries, which many Ada users would use.
My workplace uses Ada SPARK for high-integrity automotive software, ported from C or C++.
IIUC, the contracts and static proofs can replace some activities like isolated unit tests for C++ .
I use Ada for a lot of projects where C would otherwise be the default language of choice. I find that I spend much less time getting tied up debugging silly errors. In a lot of cases, Ada makes it difficult to do things the wrong way. When I move from working in C to Ada, there isn't much I miss, but when I move the other way around, I feel like I'm missing so much!
I've used it in my personal hobby projects for several years now, Ada/SPARK is a favourite language of mine. It's not a legacy language and it has features which I wish mainstream languages would have, particularly regarding the formal verification utilities of SPARK. It's also great for bare metal development.
I've not managed to convince anyone else to use it, as most are discouraged by either its Pascal-style "verbose" syntax on first glance or its general lack of third-party libraries (relative to something like Rust's ecosystem). Anyone who can get past those aspects should really give it a try.
We used it for a new Defense/Aerospace projects. Language-wise it's fine although verbose. Intent was to separate similar IP so there was no claim of cross contamination. Built-in threading and a robust standard library is nice.
Could you share what tools you were using, and what you felt was missing?
I write Ada in vscode, because it's what I use in my dayjob. AdaCore's plugin has good language support^1, but I don't use it for much other than formatting, or expect sophisticated automated refactoring functionality from it.
^1: It's still missing support for some Ada202x features. I can't wait for it to support `return when...`.
The Ada stronghold is aerospace and defense systems. So these may or may not be legacy systems, but they are safety-critical or mission-critical systems that rely on long standing well defined development processes. That inflexibility means that advancements in the technology are very slow to creep into usage. That goes not only for the languages/compilers but also the silicon and everything in between.
I'm not in banking so I don't know if banks write new business logic with Cobol or merely maintain existing systems. I would be very surprised, though, if modern web-based products are using Cobol, or fancy high-speed trading platforms, or big data-driven machine learning, etc.
reply