Also we are now on Ada 202x already, quite different from Ada83, that some Rust folks keep comparing their favourite language with.
You get all the niceties of a language more in line with Object Pascal productivity, formal proofs, a RAII approach safer than C++ (controlled types, automatic stack types, unbound collection types), industry baremetal profiles like Ravenscar, and the recent versions are in the process of having affine types as well (aka borrow checker).
whytevuhuni · 1h ago
I don't know Ada / SPARK, and I've been trying to figure this out. Based on the hallucinations I got from ChatGPT, it seems Ada itself is nowhere near as powerful as Rust in safety, while Ada with SPARK disallows some things I was considering to be quite basic, such as shared aliasing of data.
For example, it seems it's not possible to get a sub-string slice reference to an original unbounded string. In rust, a &str -> &str signature is trivial.
So it seems Ada still relies on discipline, while SPARK does not have the zero-cost abstractions that C++ and Rust have.
If that's true (is it?), then I'd definitely choose C++/Rust over Ada any time, since performance is very important to me.
anthk · 1m ago
FFS, ChatGPT doesn't even has a clue on what is talking about.
pjmlp · 56m ago
Less ChatGPT and more language reference manuals, ChatGPT isn't an ancient oracle knows it all, even though Microsoft's marketing sells it as such.
Ada has as much zero cost abstractions as C++ and Rust have, and one of the reasons of Ravenscar is even what to turn off for bare metal deployments, and real time OS deployments.
cashsterling · 5h ago
Yeah... my intro CS class was in C and Ada95 (I'm not a CS guy btw, just took the class). I actually preferred Ada over C... but continued to program in C for other classes because of compiler availability; I had to do all my Ada programming on Sparc workstations at school.
I personally think that AdaCore, and friends, missed an opportunity in the early 2000's to fully embrace open source... they left a big gap which Rust has filled nicely.
I still think Ada is a great programming language. When a question comes up along the lines of: "what's the best programming language nobody's heard of?", or "what's the best programming language that is under used?" Ada is usually my first answer. I think other good answers include F#, <insert LISP flavor>, Odin, Prolog, Haxe, and Futhark (if you're into that sort of thing).
pjmlp · 2h ago
We are on Ada 202x nowadays being discussed, and in a world where FOSS tool makers have problems making a sustainable business, always changing licenses, there are still 7 Ada vendors selling compilers.
steveklabnik · 5h ago
Rust is also making inroads, probably the most famous example is there’s two models of Volvo shipping today that rely on it.
pfdietz · 4h ago
Are auto companies going with error correction in memory? I'm thinking of the Toyota unintended acceleration problem.
Wasn't a correlation with elderly drivers and the unintended accretion found in the Toyota cases?
f1shy · 3h ago
Just because they could not handle it. It happened to many people, young people hndled that better.
nickpsecurity · 3h ago
It happened to me. I sure wasn't elderly. The only thing that stopped a crash was shifting into neutral and hitting the brakes.
Then, I was sitting there with the engine revving loudly for no reason. Car behind me started backing up. I decided to just shut it off and turn it back on. It went away.
Scary stuff. Especially since I had no idea why it happened.
pfdietz · 3h ago
How about a difference between Toyotas and non-Toyotas? It's not like elderly drivers are unique to Toyotas.
Also, unintended acceleration seems to have gone away. The control hardware has been changed; driver age, not so much.
FirmwareBurner · 9h ago
But why? The US military abandoned Ada for the F-35 and moved to C++ instead. Is it me or are they moving backwards?
seabird · 8h ago
Everything I've heard about it was that it was pressure from contractors because they didn't like training or finding Ada talent.
I get that there's more tools for C++ but first class formal verification support and a language that's generally designed to save you from yourself seems like something you would stand your ground on. Ada is supremely good at killing people and/or keeping them un-killed, there's a reason you still see it kicking around in defense and aerospace despite the common perception that it's a bygone relic.
johnnyjeans · 8h ago
you mean the plane plagued with software development issues[1][2]?
even ignoring the obnoxious yellow journalism, i'm not sure it's a shining beacon of best practices. or that replacing one ancient language with an even more ancient language is "moving forwards."
particularly when the language you're replacing was explicitly designed for your domain, and the language you're replacing it with is an entropic event horizon from which no coherent thoughtform can escape.
Ever wondered why F-35 is so famous for software bugs, including in-flight reboot from avionics?
nabla9 · 8h ago
It was not for technical reasons. They needed more programmers and C++ had larger user base.
Ada is technically better choice.
CivBase · 8h ago
It has more to do with tooling than programmers. C++ is used everywhere so there are many commercial tools to support it. Not so much for Ada.
Ada's developmemt tools are fewer, less featued, and more costly due to low demand.
pjmlp · 2h ago
There are 7 compiler vendors still in business, if anything Ada's domain is one of the fews where paying for tools one needs to do their job is still a thing, like in most professions.
johnisgood · 7h ago
> Ada's developmemt tools are fewer, less featued
Such as?
dardeaup · 7h ago
Regarding the number of options, C++ has quite a few IDEs: Visual Studio, Xcode, VSCode, CLion, and probably more (Oracle probably still sells the one they had for Solaris). For command-line compilers, C++ has: Visual Studio, Xcode, g++, clang++, IBM C++ compilers for their OSs, Oracle compilers for Solaris, etc.
For Ada, is there anything other than AdaCore? Is that the same as GNATStudio?
Edit* - fixed Ada capitalization
RavSS · 5h ago
You don't have to use AdaCore's GNAT Studio. You can quickly get going with Ada/SPARK using Visual Studio Code, as there is an LSP extension for it published by AdaCore themselves.
cjbgkagh · 6h ago
I think IBM Rational Ada was a thing back then. Never used it but heard stories about it.
cjbgkagh · 4h ago
I should add, what I was told is that they were amazing, especially the pre-IBM Rational stuff. Rational was acquired by IBM in 2003. I was working on tech adjacent to the JSF (F35). I was told by a guy working on the JSF that the extra bugs from C++ would mean better job security and he was 100% right. It’s pretty much that conversation that triggered my move into high tech and away from military. I think it’s a shame that IBM happened to Rational, a lot of nascent good ideas pretty much disappeared or were mangled beyond recognition.
ryao · 1h ago
Netbeans is the Solaris IDE. It is free.
p_l · 5h ago
The kind of tooling you need for avionics is not necessarily the kind of tooling you use for non-safety critical code.
None of the tools mentioned, other than in limited level IDEs (for practical purposes in safety critical C++ expect some niche variation of Eclipse just like if you used Ada) are valid for the F-35 project.
CivBase · 7h ago
Want a compiler? I hope you like GNAT.
Want an IDE? I hope you like GNAT Pro Studio.
Want a static analysis tool? I hope you like CodePeer.
Ada compilers: PTC ApexAda, GreenHills Ada, Static analysis tools for Ada: CodePeer, ConQAT,Fluctuat,,LDRA Testbed,MALPAS,Polyspace,SofCheck Inspector,Squore,Understand. Similar list for all other things.
When C++ was chosen for F-35 there were more verification tools to Ada than C++.
bb88 · 8h ago
SPARK formal verification is a big win. Ada is also simpler than C++.
However, the tooling for Ada was never as good as C++ tooling.
firesteelrain · 7h ago
GNAT, AUnit, VectorCAST are all good. AUnit isn’t compatible with Ada 95 though
gneuromante · 9h ago
It was the US military who moved backwards.
firesteelrain · 7h ago
Language selection is no panacea for bad systems engineering or poor project management
"Nvidia Security Team: “What if we just stopped using C?”, 170 comments (2022), https://news.ycombinator.com/item?id=42998383
This is the original announcement from 2020,
"SPARK/Ada Journey to Adoption"
https://youtu.be/DZSSyWlsb28?si=vh4gO-LT2N3Skaql
Also we are now on Ada 202x already, quite different from Ada83, that some Rust folks keep comparing their favourite language with.
You get all the niceties of a language more in line with Object Pascal productivity, formal proofs, a RAII approach safer than C++ (controlled types, automatic stack types, unbound collection types), industry baremetal profiles like Ravenscar, and the recent versions are in the process of having affine types as well (aka borrow checker).
For example, it seems it's not possible to get a sub-string slice reference to an original unbounded string. In rust, a &str -> &str signature is trivial.
So it seems Ada still relies on discipline, while SPARK does not have the zero-cost abstractions that C++ and Rust have.
If that's true (is it?), then I'd definitely choose C++/Rust over Ada any time, since performance is very important to me.
Ada has as much zero cost abstractions as C++ and Rust have, and one of the reasons of Ravenscar is even what to turn off for bare metal deployments, and real time OS deployments.
I personally think that AdaCore, and friends, missed an opportunity in the early 2000's to fully embrace open source... they left a big gap which Rust has filled nicely.
I still think Ada is a great programming language. When a question comes up along the lines of: "what's the best programming language nobody's heard of?", or "what's the best programming language that is under used?" Ada is usually my first answer. I think other good answers include F#, <insert LISP flavor>, Odin, Prolog, Haxe, and Futhark (if you're into that sort of thing).
https://www.slideshare.net/slideshow/toyota-unintended-accel...
Then, I was sitting there with the engine revving loudly for no reason. Car behind me started backing up. I decided to just shut it off and turn it back on. It went away.
Scary stuff. Especially since I had no idea why it happened.
Also, unintended acceleration seems to have gone away. The control hardware has been changed; driver age, not so much.
I get that there's more tools for C++ but first class formal verification support and a language that's generally designed to save you from yourself seems like something you would stand your ground on. Ada is supremely good at killing people and/or keeping them un-killed, there's a reason you still see it kicking around in defense and aerospace despite the common perception that it's a bygone relic.
particularly when the language you're replacing was explicitly designed for your domain, and the language you're replacing it with is an entropic event horizon from which no coherent thoughtform can escape.
[1] - https://www.dote.osd.mil/Portals/97/pub/reports/FY2024/other...
[2] - https://www.gao.gov/products/gao-24-107177
Ada is technically better choice.
Ada's developmemt tools are fewer, less featued, and more costly due to low demand.
Such as?
For Ada, is there anything other than AdaCore? Is that the same as GNATStudio?
Edit* - fixed Ada capitalization
None of the tools mentioned, other than in limited level IDEs (for practical purposes in safety critical C++ expect some niche variation of Eclipse just like if you used Ada) are valid for the F-35 project.
Want an IDE? I hope you like GNAT Pro Studio.
Want a static analysis tool? I hope you like CodePeer.
Want to do unit testing? I hope you like Rapita.
When C++ was chosen for F-35 there were more verification tools to Ada than C++.
However, the tooling for Ada was never as good as C++ tooling.