[Dlang-internal] DIP1000 discussion and testing

Martin Nowak via Dlang-internal dlang-internal at puremagic.com
Thu Dec 15 09:18:35 PST 2016


On Saturday, 10 December 2016 at 05:00:42 UTC, Walter Bright 
wrote:
>> - what about return ref without scope
>>
>> Does return ref on parameters makes sense without scope?
>
> Yes, see dip25.
>
>> Can you take the address of an unscoped return ref result?
>
> Taking the address of a ref makes it a scope.

Thanks, that was likely the piece of information I was missing.
So even with all the scope changes, a return ref parameter 
provides the same guarantees, it can't be escaped in a @safe 
function.


More information about the Dlang-internal mailing list