Re:Reclaiming C++ Data Structures with Cycles
by jdright on Thursday October 13, 2016 @09:47AM
(#12700716)
And C++ is all about choice trade-offs.
Put very simply: do your choice for your problem and deal with its consequences.
Re:Reclaiming C++ Data Structures with Cycles
by steveklabnik on Thursday October 13, 2016 @09:35AM
(#12700637)
Nobody says GC has no advantages, the claim is that its disadvantages don't always offset them.
For example, in C every time a `const char *` appears in an API there has to be an implicit contract about who owns the string and how to free it. A language like Rust improves on this by enforcing such contracts, but the contracts still complicate every interface.
In a GC'd language you can just forget about these issues and just treat strings (and other immutable objects) almost as if they were ordinary fixed-sized values.