this post was submitted on 29 Nov 2024
5 points (54.7% liked)

Rust

6126 readers
21 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 3 weeks ago (3 children)

I have only skimmed the surface of learning Rust, but I am wondering what it has over Ada. The memory safety features that Rust emphasizes have been standard there for 40 years, and just as unglamorous compared to C++.

I tend to focus on scripting nowadays... R and Pyrhon... with the odd C++ for high-speed algorithms because it is popular. But is Rust merely a new face on Ada?

[–] LeFantome 14 points 3 weeks ago (1 children)

Rust is already dramatically more popular and widespread than ADA ever was ( outside the US military ). Devs that use Rust say they love it. I do not believe that is the rule for ADA.

Rust is also very well suited to extending existing C and C++ code bases. I do not know enough about ADA to compare but it is my sense that it is not as strong there.

There is no ADA in the Linux or Windows kernels.

[–] [email protected] 2 points 2 weeks ago

Well, I suppose the DoD association probably turned off a lot of people... but the language lived up to its promise of being a strict schoolmarm so if that is what people are looking for these days it is still an option. It can link with C, not sure about C++.I am not sure what being in the Linux or Windows kernels says other than reinforcement of the popularity contest... Windows is proprietary, and Rust being in Linux is hardly controversy-free.

Anyway, thanks for your thoughts. I also found this:

https://blog.adacore.com/should-i-choose-ada-spark-or-rust-over-c-c#%3A%7E%3Atext=Rust+pushes+memory+safety+very%2CThese+are+just+two+examples.

[–] nous 11 points 3 weeks ago

But is Rust merely a new face on Ada?

They share some features. But what language does not share any features with any other language? Any new language these days will be heavily inspired by and take features from other languages while making changes to or pulling in features from other places to create a mix that is unique to that new language. Rust is far more than just its GCless memory safety features and I am not even sure if they are inspired by ada or were just arrived at a similar solution to ada - they are not exactly a one to one matching with how ada does anything. If anything I believe that rust is much more heavily inspired by ocaml than ada.

[–] [email protected] 7 points 3 weeks ago (1 children)

From what I understand, Ada does not have an equivalent to Rust's borrow checker. There's efforts to replicate that for Ada, but it's not there yet.

[–] [email protected] 1 points 2 weeks ago

Thanks for the helpful response. The BC looks like a potentially very useful anti-bugging tool.