Retrofitting Temporal Memory Safety on C++
security.googleblog.com
security.googleblog.com
With systems languages like Go and Rust things are slowly changing, but we're still bogged down in the swamp.
Go also has its own share of hacks by ignoring the history of language design since early 60's, while Rust remains to be seen how they will evolve the missing parts of error handling, co-routines, and system programming use cases from C and C++, where Rust still hasn't a mature alternative.
Both are definitly safer by default than either C or C++, however since Modula-2, Object Pascal and Ada, there were many other alternatives as well.
The OS vendors decided to go another route, and as we see here, the Chrome team isn't keen in following the Firefox route, rather improve the existing codebase.
https://www.chromium.org/Home/chromium-security/memory-safet...
It is also interesting how Herb Sutter avoiding making the comparision between deferred deallocation and GC algorithms on his talk until the last section.
"CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”"
Free Pascal uses such a system to manage strings, to good effect. You never have to deal with allocating, nor deallocating strings that can be a gigabyte in size. You can freely pass them by value or reference between functions and procedures and threads.
C++ actually did have copy-on-write strings before C++11 (at least the std::string implementation in GCC/libstdc++ used CoW strings) but CoW implementations were made illegal because they caused a number of other problems.