Opportunities for D

ponce via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 9 02:08:10 PDT 2014


On Wednesday, 9 July 2014 at 02:44:54 UTC, Walter Bright wrote:
> On 7/8/2014 6:01 PM, Mike wrote:
>> On Tuesday, 8 July 2014 at 21:22:31 UTC, Walter Bright wrote:
>>
>>> 1. Ref Counting
>>>
>>> I believe that ARC is a pipe dream for D, as we've discussed 
>>> extensively here.
>>> But a ref counted object should work, and would be very 
>>> attractive, much like
>>> C++'s shared_ptr<T>.
>>
>> How does this differ from std.typecons.RefCounted?
>
> Let me put it this way: users all complain that D doesn't have 
> ref counting. If typecons.RefCounted works, why is this 
> happening? What can be done to convince people that D does ref 
> counting? If it doesn't work, what needs to be done to fix it?

I think the problem is that people like to have reference 
semantics for ressources but only struct support deterministic 
destruction, and are value types..

If Unique and RefCounted were a bit more usable people interested 
in deterministic release (ie. almost everyone) could drop using 
classes for resources and live happily.





More information about the Digitalmars-d mailing list