DIP69 - Implement scope for escape proof references

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 11 22:06:38 PST 2014


On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright 
wrote:
> Consider a ref counted type, RC!T. If scope were transitive, 
> then you could not have, say, a tree where the edges were RC!T. 
> I.e., the payload of an RC type should not be forced to be 
> scope.

I don't see how this is related. It would be perfectly ok to 
declare root of such tree scope if it was transitive (as long as 
it only controls access and does not attempt early destruction).

You may want to explain this in details in DIP if this is 
motivating case.


More information about the Digitalmars-d mailing list