DIP25/DIP1000: My thoughts round 2

Paul Backus snarwin at gmail.com
Wed Sep 5 01:06:47 UTC 2018


On Tuesday, 4 September 2018 at 16:36:20 UTC, Nick Treleaven 
wrote:
> My syntax for parameters that may get aliased to another 
> parameter is to write the parameter number that may escape it 
> in its scope attribute:
>
> On Sunday, 2 September 2018 at 05:14:58 UTC, Chris M. wrote:
>> void betty(ref scope int*'a r, scope int*'a p) // okay it's 
>> not pretty
>
> void betty(ref scope int* r, scope(1) int* p);
>
> p is documented as (possibly) escaped in parameter 1.

Would using parameter names instead of numbers work? As an 
unfamiliar reader, it wouldn't be clear at all to me what 
`scope(1)` meant, but `scope(r) int* p` would at least suggest 
that there's some connection between `p` and `r`.


More information about the Digitalmars-d mailing list