DIP69 - Implement scope for escape proof references

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 5 07:16:53 PST 2014


On 12/4/14 5:48 PM, deadalnix wrote:
> On Thursday, 4 December 2014 at 14:58:47 UTC, Steven Schveighoffer wrote:
>> "There can be at most one owner for any piece of data."
>>
>> This doesn't seem right. For GC data, the GC owns the data, that is
>> true. But for Ref-counted data, there is more than one owner, and only
>> when all the owners disown the data can it be destroyed.
>>
>
> The RC mechanism is the owner. Ownership is loosly defined in this DIp
> so that it do not close any door for future language evolution.

Well, actually the DIP is pretty rigid, it speaks only of ownership in 
terms of variables -- which variable owns a piece of data. It doesn't 
allow this kind of ownership via a concept or condition.

I would change the DIP to reflect this clarification, if that is what is 
intended.

-Steve


More information about the Digitalmars-d mailing list