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.
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!
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.
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.
In case anyone is curious about an overview of the actual changes: http://www.ada-auth.org/standards/22over/html/Ov22-TOC.html
My understanding is that most of Adas users are maintaining legacy systems.
It'd be great to hear from anyone who is using it today by choice.
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.
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++ .
https://www.wevolver.com/article/nvidia-adoption-of-spark-us...
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!
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.
Tool-wise - refactoring was a bit of a pain.
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.
The same can be said for Cobol and its relarionship with banking, but you will struggle to find anyone not categorizing cobol as legacy.
2 replies →
If you want to learn Ada / SPARK, try https://learn.adacore.com/index.html.
Many ada devs probably write software i would not be comfortable writing. Its always been a kind of place i dont want to be part of.
Assuming your discomfort is around the defense side of things here's an example of a diving reberather system using Spark/Ada from a while back.
https://youtu.be/zL9vVs5vHuQ?si=-thG-FkelkW6oFfb
It's used for planes, trains, and automobiles. No reason to feel uncomfortable working on those things.
[flagged]
https://news.ycombinator.com/newsguidelines.html
I wonder what Ada Lovelace would think about her namesake being the language for weapon systems.
She was an aristocrat in the greatest empire the world had ever seen. She is unlikely to have objected to weapons systems per se.
I’d rather fly in an airplane with a system coded in Ada/Spark rather than Python ¯\_(ツ)_/¯
1 reply →
[dead]