CppCon Making C++ Safe, Healthy, and Efficient - CppCon 2025
https://youtu.be/p52mNWsh-qs?si=Bz6pyW6d0SMLCZxVNow with some updated content since the ACCU talk, and the Q&A is nonetheless interesting.
55
Upvotes
View all comments
60
u/James20k P2005R0 Jan 11 '26
I'm not convinced by runtime checking at all. Its going to be extremely expensive to check, and it amounts to standardising UBsan. It seems very un-C++ for the safety story in C++ to be so superbly expensive to turn on vs something like Rust. Runtime checking is also much less powerful than compile time checking - it can only catch bugs that are triggered. If fuzzing + runtime checks were good enough, ubsan would have solved memory safety
Perhaps we could designate explicitly the blocks of code where we want the checks to be turned off. Maybe some kind of
nocheckme{}block, where we can call unchecked versions of the functions for performance reasonsSome generic misinformation about Rust being slow, this kind of stuff is starting to become quite unprofessional. Borrow checkers allow compilers to optimise more due to much better aliasing information