Actually hot take: Modern C++ is less safe than classic C++, which is less safe than C.
I don’t really agree. Most of the new “safety” features (RAII, in particular) are of the form “protects against memory leaks”, which aren’t really safety features in the form of memory safety as memory leaks are safe.
-
-
I disagree, RAII does prevent some safety problems (clear model for deallocation, of the object and its properties). and std::unique_ptr etc. help with some others.
-
See, I think deallocation is the weakest point of RAII—it’s not at all obvious where it happens, especially with temporaries. That causes trouble. Whereas with C “free” is right there in the code.
- 4 more replies
New conversation -
-
-
RAII ain’t new (oooh double entendre).
- End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.