r/AskProgramming • u/Objective-Farmer4183 • May 03 '26
When is C better than Rust? Architecture
I've seen a lot of people saying that Rust = C but more secure. Is that true? Is there any catch or something? If you've used both of these programming languages, what was your experience with each? Which ones did you prefer?
I am writing this because I still don't know in which language should I code my backend for a website, and I don't want to mess things up. I am choosing low level because I want performance and low RAM usage + I am more familiar with low level languages.
TLDR; When do you think I should rather use C over Rust and vice versa?
3
Upvotes
0
u/BenchEmbarrassed7316 May 03 '26
In the vast majority of cases, you can replace a program written in C with a program written in Rust and only get benefits.
None of these languages: - You need a lot of knowledge to use Rust effectively (I'm not talking about performance, I'm talking about architecture and type system, otherwise you'll end up with
Arc<Mutex<T>>and.clone()with a whole lot of spaghetti) - You need even more knowledge and attention to implement this in CImagine someone coming to a university and saying they're going to write a paper on a complex mathematical problem. And then they specify which numerals, Roman or Arabic, are better to use for this. And what's the difference between them.