r/programming • • Feb 20 '25

Google's Shift to Rust Programming Cuts Android Memory Vulnerabilities by 68%

https://thehackernews.com/2024/09/googles-shift-to-rust-programming-cuts.html
3.4k Upvotes

475 comments sorted by

View all comments

-12

u/SadieWopen Feb 20 '25

Can someone explain to me why we can't just do this in C? I understand that Rust is a "Safe" language, but why can't we just code in "Safe" C? I can't understand how adding more complexity results in faster execution.

23

u/CommandSpaceOption Feb 20 '25

Have you ever used Rust? Or are you relying on the opinions of other people?

I don’t mean to put down what you said, but the way you’re thinking about C and Rust indicates limited experience with one, perhaps both.

Firstly, Android development happens in C++. Secondly, they’ve tried every technique available but they haven’t been able to write secure C++. At some point reality clashes with the opinions of fanboys telling you to “just code using best practices”.

0

u/[deleted] Feb 20 '25

[deleted]

6

u/nderflow Feb 20 '25 edited Feb 21 '25

Butt sure what you have in mind there, but Google's tooling is pretty impressive. Sanitisers in CI pipelines, coverage and mutation analysis, lots of static analysis.

→ More replies (4)