On 7/8/2014 9:12 PM, Mike wrote:
From what I've observed, I don't think users are complaining that D doesn't do ref counting.
The recurrent observation is "I use C++/Rust/Whatever because they do ref counting, and D uses GC. Therefore I cannot use D."
I believe they are complaining that D doesn't do pervasive automatic reference counting.
ARC has been extensively studied and debated at great length for D. It is not going to work for D. Nobody has figured out a way to make it work for D. Let's move on to what will work.
RefCounted can't be used with D's built-in types, right?
The question doesn't make sense. What is a ref counted int?
IMO users are complaining that the current mark-and-sweep GC is not suitable for certain applications, and they want something that is. The solution that comes to their mind is pervasive ARC, so that's what they say they want. And because they can't actually try it for themselves, they aren't convinced it's not a feasible solution (It would be nice to see some measurable results).
We've been over this ground many, many times. Saying people want ARC is correct. Nobody has proposed a feasible design or a way to get to one (I failed at that, too).
If RefCounted is intended to have shared_ptr<T> semantics, then it does appear D does reference counting, but I believe it's pervasive automatic reference counting that users really want to try.
There's no known way to get ARC in D.
