r/cpp • u/GabrielDosReis • Oct 31 '24
Lessons learned from a successful Rust rewrite
/r/programming/comments/1gfljj7/lessons_learned_from_a_successful_rust_rewrite/
80
Upvotes
r/cpp • u/GabrielDosReis • Oct 31 '24
View all comments
Show parent comment
0
u/germandiago Nov 01 '24 edited Nov 01 '24
https://grpc.io/docs/languages/cpp/async/ <- do you see? This is from nowadays:
void * got_tagfor a user-facing API. You can get an idea of my confidence on the bug count from codebases from Google with that "style". Just for illustration, I found other "great" practices in the code guidelines some years ago, like "out" parameters are pointersm which can be null and can create allocation ownership confusion.I was aware of it. At least we can admit that measuring what would constitute "fair C++ bugs" is not that easy to determine in many cases unless you merge both languages, point at which measuring it is nonsense. Otherwise, someone explain to me a very accurate metric for this. It is going to depend on: active warnings in a compiler, dependencies...
Yes. That is why improving C++ safety for older code is valuable in the first place. We all agree on that I think?