4 ms·
Because safety requires that the language prevent you from doing things and libraries don't have much ability to do that. Example: C++ shared_ptr gives you ref
by roca 5y ago
Because safety requires that the language prevent you from doing things and libraries don't have much ability to do that.
Example: C++ shared_ptr gives you reference counting which helps prevent use-after-free errors. However, shared_ptr can't stop you getting a raw pointer or reference to the underlying object, which can then be used to trigger a use-after-free bug.