[Dlang-internal] DIP1000 discussion and testing

Walter Bright via Dlang-internal dlang-internal at puremagic.com
Sat Dec 17 21:59:00 PST 2016


On 12/17/2016 8:03 PM, Martin Nowak wrote:
> On Saturday, 17 December 2016 at 07:29:17 UTC, Walter Bright wrote:
>> On 12/16/2016 9:08 AM, Mathias Lang wrote:
>>> As long as we have:
>>> - A way to take the address of `scope` pointers
>>
>> Taking the address of a scope pointer is invalid, I'll fix the method you used
>> to do it.
>
> What is the reasoning for disallowing that?

scope is not transitive, and there's no way to declare a scope pointer to a 
scope pointer.

> Is dealing with second order indirections (scope int**) somehow different from
> from other escape checks?

Yes. Only the top level is checked. By disallowing taking the address of a scope 
variable, only the top level needs to be checked.




More information about the Dlang-internal mailing list