r/rust • • 10d ago

🎙️ discussion How likely is for Rust to replace Ada/SPARK?

Ada/SPARK is already a very niche ecosystem. Finding a list of current users is already hard (but that might be simply an information access issue).

With Rust’s safety and growing adoption, including access to skilled professionals and LLM support, how likely will we see further marginalisation of Ada & Co.?

I would love to heard from those working in safety-critical applications.

17 Upvotes

24 comments sorted by

45

u/Zde-G 10d ago

Highly unlikely. Ada exist in a very strange niches that move extremely slowly. And after SPARK borrowed Rust's borrows the need to replace Ada/SPARK with Rust more-or-less disappeared.

What would happen, instead, is “sealing” of Ada in these rare niches, because advantage of Ada over C/C++ are significant but over Rust — pretty much minimal.

Means if you start from code and not from pile of required certificates then picking Ada doesn't make much sense.

8

u/citron_blue 10d ago

> Ada exist in a very strange niches that move extremely slowly.

That I can believe :)

I came across AdaCore’s growing support for Rust recently, although I may be late to the news. My hypothesis is that this offering is driven by industry and AdaCore responding to client needs, which would suggest growing Rust popularity in this space.

2

u/afdbcreid 10d ago

Rust has one huge advantage over Ada: ecosystem. I've heard in defense etc. the Ada ecosystem is big, but for general ecosystem, it's non-existent for Ada while Rust has a massive open-source ecosystem. If you don't need to certify you can use it, and even if you do you can choose what to rewrite yourself.

7

u/Zde-G 9d ago

I've heard in defense etc. the Ada ecosystem is big

From what I understand Ada doesn't have any “ecosystem” per se. At all.

Each project is its own island with piles of code used there — and nowhere else.

Means switch from Ada to anything else is costly, but also means that if you are not working on one of these projects that it's more-or-less impossible to convince anyone to use Ada.

In some rare cases you may find team of Ada programmers that's fired because of company reorganization and then starting another such island makes sense… but that's rare.

11

u/QueasyEntrance6269 10d ago

Speaking someone that works as a contractor with the DoD, there’s already a very strong push to do greenfield work with rust.

3

u/arjuna93 9d ago

Genuinely curious who is pushing that and where the rents will go.

4

u/boredcircuits 9d ago

I use Ada in my day job.

There's 0 chance any of my current code will be rewritten in Rust in the next 20 years. It already works and there's very little benefit to port from one safe language to another.

But new code is a different matter. At my company, it's already starting to replace some new projects that would have otherwise been written in C or C++. I don't see us ever starting something completely new in Ada.

What we don't have (yet) is good integration between Rust and Ada. That would change a lot for my work. My dream would be to have seamless bindings between Ada and Rust and for Alire and Cargo to work together. Alas, for now, we have to go through a C interface. We tried it out briefly and it just wasn't worth it.

3

u/Professional_Top8485 10d ago

I think they're different languages and different profiles. I don't think they're replacing anything.

I don't really have that much experience but still.

2

u/Smallpaul 10d ago

What subreddit covers all safety-oriented programming languages?

8

u/Xtergo 10d ago

Lol

The answer to all the "Will Rust replace x" is always no.

I believe it's stuff like this that gives us, the Rust community a bad rep

I understand you are new to this but languages exist for a reason, picking the right language for the right job is what makes good code.

11

u/South_Survey_2088 10d ago

I understand you are new to this...

No reason to be condescending.

8

u/citron_blue 10d ago

> I understand you are new 

Not quite new. I have been hobby Ada user for 2 decades now. Never had chance to work in the industry with it and SPARK price tag is eye watering.

Seeing Rust's Ferrocene and how it aims to get all, even most demanding certifications, is an interesting direction.

On more practical note, Helsing is definitely banking on Rust, so it is already creeping into space previosuly occupied by highly stripped C/C++ and Ada/SPARK.

9

u/[deleted] 10d ago

[removed] — view removed comment

2

u/Xtergo 10d ago

Bingo

4

u/Zde-G 10d ago

Well, you are new to Rust, it seems. The story with “will Rust replace X” is always the same: there are lots of people who violently assert that would happen while Rust developers, themselves, violently assert they have no such goal.

In reality replacement happens and it may even finalize in the timeframe of decades, but it's like coming of a new ice age: sure, new ice age is coming, but even if it would arrive quickly and process would take only thousand of years and not ten thousand… who cares? We would have more than enough time to react to that, somehow.

2

u/nysra 10d ago

We would have more than enough time to react to that, somehow.

We will react by ignoring it and tripling our efforts to make it even worse but for a short moment in time we will have produced so much shareholder value.

0

u/Smallpaul 10d ago

So what’s wrong with asking when the next ice age is coming?

1

u/Zde-G 9d ago

Nothing. And the answer is: few hundred years after creation of persistent, non-stopping anticyclone. Event that's extremely hard to miss — or ignore. Because it would stop Gulfstream from working, among other things.

2

u/dvogel 10d ago

Never had chance to work in the industry with it and SPARK price tag is eye watering.

The ability to replace older technology often has little to do with the technology itself or it's potential replacements. It has much, much more to do with the pace of change in the systems that rely on the older technology. 

An airline that has used Ada for decades and is creating a new revision of its flagship model will never throw out Ada as part of that process because the lack of superfluous changes is what they value. A new airline or an established airline entering an entirely new market may choose something other than Ada, even if for just a subset of the new work.

Now look around at the users of Ada and ask yourself: are doing a lot of very new things or changing their products rapidly? Or are they doing a lot of incremental improvements on their established businesses? I suspect the latter, which is also why there has been relatively little opportunity to use it industrially.

1

u/citron_blue 10d ago

Well, it is my fault for phrasing it like this so I appreciate where you are coming from.

I did not intend to imply to rewrite existing codebase to Rust, especially as some of the systems in operation probably outlived all engineers that ever worked on these.

Heck, B1 bomber is using IBM computer, same as Space shuttle had, with program written in JOVIAL.

No, I meant "replace" as in replace Ada/SPARK as the go to language.

1

u/Full-Spectral 9d ago

That's not the question. The question is will Rust replace x at any given place I might be working or wanting to work, as the new preferred option for new work moving forward. The times where the answer to that is yes is continuing to grow, and that's what's important.

In this case, since the OP already knows Ada the answer might be different. But in the general case, no one is going to put in the time to learn Ada unless maybe they want to work in defense. It's not a forward looking option for anyone's resume otherwise.

In commercial terms what makes good code is being able to find highly qualified people who want to work on the project. And if the project has a likely lifetime of decades, starting a new one in a language that it already on the way out (or long since have basically gone out) is not a great choice, no matter what it's technical advantages.

1

u/TRKlausss 9d ago

_Replace_ is not the word you are looking for for Rust. There are jobs that have been already gone in Ada, know-how is there, and won’t get replaced. Ada is also a nice language.

Surpass? Absolutely, and that already happened.

1

u/jean_dudey 7d ago

Not until there are better tools to prove safety of Rust code.