DIP1000
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Thu Jun 23 20:27:44 UTC 2022
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?
> But that only works for this very special case. It falls apart
> when you try to add a third node. As far as I understand,
> `scope` cannot handle linked lists. A `scope` pointer cannot
> point to another `scope` pointer.
One can do two levels, but not three. Got it. Works for some
basic data-structures.
More information about the Digitalmars-d-learn
mailing list