4 ms·
I find it funny that the solution to C++'s memory woes involves retrofitting what's essentially a GC on top of it. Reminds me of the quote along the lines that
by e63f67dd-065b 4y ago
I find it funny that the solution to C++'s memory woes involves retrofitting what's essentially a GC on top of it. Reminds me of the quote along the lines that all sufficiently complex codebases have a half-assed version of common lisp in it.
- klysm 4y agoDoes rust have one?
- fulafel 4y agoYes, if you explicitly request it per object and use explicit clone for refs, but it doesn't handle reference cycles: https://doc.rust-lang.org/rust-by-example/std/arc.html https://doc.rust-lang.org/rust-by-example/std/arc.html
- pjmlp 4y agoSeveral attempts have been made already, the problem is overcomming the community's resistance to have one in the box, recently they have removed the APIs introduced in C++11. 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.”" https://www.youtube.com/watch?v=JfmTagWcqoE https://www.youtube.com/watch?v=JfmTagWcqoE