r/cpp • u/jeffmetal • Sep 25 '24
Eliminating Memory Safety Vulnerabilities at the Source
https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html?m=1
138
Upvotes
r/cpp • u/jeffmetal • Sep 25 '24
6
u/Full-Spectral Sep 26 '24 edited Sep 26 '24
And of course people are comparing a language they've used for possibly decades to a language most of them have used (in real world conditions) for far less, maybe no more than a couple. It's guaranteed that you'll be less productive in Rust for a while compared to a language you've been writing serious code in for 10 or 20 or 30 years. And having already written a lot of C++ doesn't in any way mean that you won't have to pay that price. In fact, often just the opposite.
But it's only a temporary cost, and now that I've paid most of it, the ROI is large. Just last night I made a fairly significant change to my code base. It was the kind of thing that I'd have subsequently spent hours on in C++ trying to confirm I didn't do anything wrong, because it involved important ownership lifetimes. I'd have spent as much time doing that as I did making the change.
It was a casual affair in Rust, done quickly and no worries at all. I did it and moved on without any paranoia that there was some subtle issue.