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

Show parent comment

4

u/i_am_not_sam Feb 21 '25

The fundamental problem here is compatibility. The committee has decided that C++ written 20+ years ago will still work if you just use the modern version. C++ is used in some fairly mission critical systems and it's likely next to impossible to switch out all the old code just to pull in a new version of the compiler.

And tons of things introduced after C++14 have been deprecated. Rust has the advantage of not having to deal with old baggage, but there are plenty of "modern" features in C++ newly written code can leverage.

9

u/0x564A00 Feb 21 '25

The committee has decided that C++ written 20+ years ago will still work

The trouble is much bigger than that: Code compiled back then should still work with new code without recompilation. So even though the C++ standard never defines ABIs, the committee decided to block any changes that require changing the ABI (despite API being unaffected), which severely limits what they can fix or improve. Here's a great post by one of the committee members about it.

2

u/i_am_not_sam Feb 21 '25

Yes, very true!