On Thursday, 17 July 2014 at 19:14:06 UTC, Right wrote:
I'm rather fond of RAII, I find that I rarely every need
shared semantics.
I use a custom object model that allows for weak_ptrs to
unique_ptrs which I think removes some cases where people might
otherwise be inclined to use shared_ptr.
Shared semantics are so rare in fact I would say I hardly use
it at all, I go for weeks of coding without creating a shared
type, not because I'm trying to do so, but because it just
isn't necessary.
Which is why GC seems like such a waste, given my experience
in C++, where I hardly need shared memory, I see little use for
a GC(or even ARC etc), all it will do is decrease program
performance, make deterministic destruction impossible, and
prevent automatic cleanup of none memory resources.
Rust seems to have caught on to what C++ has accomplished here.
Though, GC is safer, easier and cheaper than ownership model,
which is possible in D too, if you want it.