DIP1000
ag0aep6g
anonymous at example.com
Thu Jun 23 21:05:57 UTC 2022
On Thursday, 23 June 2022 at 20:27:44 UTC, Ola Fosheim Grøstad
wrote:
> On Thursday, 23 June 2022 at 19:38:12 UTC, ag0aep6g wrote:
>> ```d
>> void connect(ref scope node a, return scope node* b)
>> ```
>
> Thanks, so the `return scope` means «allow escape», not
> necessarily return?
It means "may be returned or copied to the first parameter"
(https://dlang.org/spec/function.html#param-storage). You cannot
escape via other parameters. It's a weird rule for sure.
More information about the Digitalmars-d-learn
mailing list