DIP69 - Implement scope for escape proof references

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 9 21:22:33 PST 2014


On 12/8/2014 3:21 PM, deadalnix wrote:
> On Monday, 8 December 2014 at 21:16:36 UTC, Walter Bright wrote:
>> A 'scope ref' parameter may not be returned as a 'ref' or a 'scope ref'.
>>
>
> It can safely be returned if you consider its lifetime as the
> intersection of the lifetime of the function's parameter.

The only purpose to a 'scope ref' parameter is to say it isn't being returned. 
'ref' itself does not escape in any way other than by returning.


More information about the Digitalmars-d mailing list