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
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
5
u/MarcoGreek Jan 11 '26
I think he made an important point about unit testing and safety. My feeling about this discussion is about the creative expression of the programmer and how the language can help him to make it safe. But that has its limit in how much information you can provide to the language at compile time. And it is enforcing the idea of the programmer as a 'poet'.
So far the discussion is very memory safety centric. That is okay for the context of an ad agency like Google or Facebook where it doesn't matter if a service is failing so long the system cannot be overtaken. But in other areas it does. I have the feeling that safety discussion is going down a very narrow road of memory safety and low level languages. Is that not too narrow?
3
u/LongestNamesPossible Jan 11 '26
Healthy?
3
u/t_hunger Jan 12 '26
John promised investments from Bloomberg into the ecosystem. What is the process for free tooling projects to apply for that money?
It's the 3rd installment of this presentation, so they probably have something in place already.
1
u/Crierlon Jan 11 '26
You avoid 95% of the foot guns by using modern C++ and being careful with how you handle strings.
I suggest C++ programmers to pick up a little bit of Rust so you know where the footguns in memory safety are.
1
u/impulsir Feb 15 '26
I want to understand how cpp works and how computers understand it.so if someone could help me with what I should do to understand it that would be really great.
1
u/drbazza Jan 11 '26
I just skimmed a few seconds of this as I don't have much time to watch the whole thing yet, but it's mostly about contracts, isn't it?
Another language feature you can choose not to use in your own code because C++ is famously 'backwards compatible' (to a large degree), like const-ness and smart-pointers.
-3
u/MRgabbar Jan 11 '26
to have a programmer with no skill issues.