Conversation

This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
My view is: Shared_ptr can help with trivial refcount misuse, but that isn’t where most of the problems are. Bounds checking is helpful, but the syntactic sugar runs the wrong way ([] is unchecked). Worst: UAF is pernicious and there is very little modern C++ does to prevent it.
2
13
Replying to and
Many modern C++ constructs encourage and mask use-after-free. Using destructors for managing all resources while still using references, iterators, etc. makes that worse, not better. Features like string_view are going to amplify that even further. It mostly helps avoid leaks...
1
8
Especially if you aren't familiar with the layers and layers of template-based abstractions used in that project and it's not clear what's happening from the stack trace / debugging. The language cannot make safe abstractions yet people use tons of abstraction which is an issue.
5