this post was submitted on 25 Jan 2024
24 points (80.0% liked)
C Programming Language
993 readers
1 users here now
Welcome to the C community!
C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.
- irc: #c
π https://en.cppreference.com/w/c
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
My question when I see responses like this is: what genuinely useful new safety features have been added since Ada? It's ancient and has distinct types, borrow checking (via limited types), range types, and even fixed point types. I've always wondered what niche Rust is targeting that Ada hasn't occupied already. It feels like devs decided that safety was important, c/c++ are too unsafe, need a new language; without ever having looked to see if such a language exists?
I haven't used Ada myself, but I have heard it brought up before. One of the huge advantages Rust has is it's packaging, versioning and build system. I'd argue this is second to none.
Rust is GPL licensed. As I understand it, licensing was a major blocker for Ada and potentially hampered it's uptake in the past.
Rust has modern sensibilities, like first-class iterator support, or built-in UTF-8 strings, etc.. It also has a lot more of a functional style, rather than procedural.
More subjectively, Ada's syntax looks very... unflattering to my eyes. I much prefer Rust in that regard. Looking at Ada reminds me of my time with VHDL, which is never a flattering comparison.
Ada actually found itself implementing Rust's ownership and borrowing system, as pointers were not formally verifiable using SPARK before, so Rust must be doing something right!
Ada is still "new" compared to C, so I suspect the OP would have similar problems with it.
The question of what advantages Rust has over Ada is a good one, but I think it's been pretty well discussed already. Just a quick google for "Rust vs Ada" turns up lots of discussions.
I don't know Ada, and I love Rust, but it seems entirely plausible that the reasons for Rust's greater popularity is primarily social rather than technical. Before I learned about Rust, my impression from talking to more experienced C++ programmers was that Ada was an interesting language with good ideas that was ruined by being "designed by committee." Rust is at least the third major attempt to design a language specifically to draw some of C++'s user base, the other two being D and Ada (there are other examples that are more debatable; e.g. Erlang and Nim). But hey...at least one of them is finally gaining some ground!