Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by Jtsummers on Sunday October 05, 2025 @11:00PM
(#45487264)
It's basically a subset of Ada, so you can use it anywhere you'd use Ada. I don't think Lean is at a point that it's an Ada replacement.
[ Parent
| on HN ]
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by lenkite on Sunday October 05, 2025 @11:42PM
(#45487450)
In a project, can you develop one module in Ada and another in SPARK and compile them together ? So, you can use safety-critical code in one module and regular Ada code in other modules ?
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by Jtsummers on Sunday October 05, 2025 @11:49PM
(#45487480)
Yes, you can mix and match the two. This lets you do things like build a library with SPARK for some critical portion where you want SPARK's guarantees and can accept its limitations, and incorporate it into an application built with the rest of Ada.
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by lenkite on Monday October 06, 2025 @12:08AM
(#45487557)
Oh lovely - need to put Ada on the learning plan. Formal languages were a bit of a drag because you needed to maintain a separate "specification" copy of your critical code.
Going through Ada sample programs and surprised I can grok stuff without knowing anything about the language. Wondering why it never took off in the standard software world. Sure its a bit verbose, but so are Java and MacOS API's
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by Jtsummers on Monday October 06, 2025 @12:14AM
(#45487588)
https://learn.adacore.com/ - I'd start here, good set of tutorials on the language including some comparative ones. It won't teach you everything you might need to know, but it's a free and good starting point.
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by Agingcoder on Monday October 06, 2025 @02:14AM
(#45488157)
I think at least slow and expensive compilers back in the days, the defense and aerospace stigma, and in more recent times a common misperception that it’s closed source. And it’s never been cool stuff.
And yes you’re right, it’s a very good language.
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by adastra22 on Sunday October 05, 2025 @11:24PM
(#45487361)
Lean the math prover? What does that have to do with Ada/Rust?
Re:Should I choose Ada, SPARK, or Rust over C/C++? (2024)
by Jtsummers on Sunday October 05, 2025 @11:27PM
(#45487380)
> Lean the math prover? What does that have to do with Ada/Rust?
I'm going to be rude, but there are 4 sentences in this thread and you appear to have not read two of them.
The comment I responded to:
>> I've never heard of SPARK. What advantages does it have compared to Lean? [emphasis added]
The "It" in my response refers to SPARK.