DIP69 - Implement scope for escape proof references
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 9 22:43:47 PST 2014
On Wednesday, 10 December 2014 at 05:23:29 UTC, Walter Bright
wrote:
> 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.
That is a completely useless feature. Also, you want to have
scope return for container like thing.
More information about the Digitalmars-d
mailing list