r/cpp • • 11d ago

Google talk at REBASE'26: Agentic Coding is not going to save C++

So the REBASE'26 conference happened recently, and besides the whole thing of what Carbon has achieved or never will, there are talks like this one from Google folks, regarding what they are doing with their C++.

The talk is all about the recent ongoing migration discussed on Google security blog, and other related efforts.

https://www.youtube.com/watch?v=Ob0CMX8s55s

76 Upvotes

212 comments sorted by

View all comments

Show parent comment

0

u/chaos_pill 8d ago

yeah, nobody's criticizing them for making sane decisions. Just pointing out that unsafe C heritage is hard to remove in theory, but almost impossible in practice (the vast majority of code is still legacy c/c++, and they are not going to adopt profiles or even clang-tidy anytime soon).

2

u/CreativeAlbatross319 7d ago

But I would argue that static analyzers pretty much already remove 95% unsafe usages both from C and old C++, especially banning new/delete, C arrays, C chars*, index access via brackets, pointer arithmetic, etc. The rest of 5% being still there wouldn't be a huge deal.

1

u/chaos_pill 7d ago

The 5% unsafe, at best, is just raw C. But, there's also unsafe C++ parts like iterator invalidation, ODR violations (eg: contracts if approved), unchecked optional deref or vector indexing, const_cast etc..

I agree that static analyzer helps A LOT, but most can't use it because they will need to rewrite significant portions of their c/c++ codebase.