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.

  • DIP1000 Ola Fosheim Grøstad via Digitalmars-d-learn
    • Re: DIP1000 ag0aep6g via Digitalmars-d-learn
      • Re: DIP1000 Ola Fosheim Grøstad via Digitalmars-d-learn
        • Re: DIP1000 ag0aep6g via Digitalmars-d-learn
          • Re: DIP1000 Ola Fosheim Grøstad via Digitalmars-d-learn
          • Re: DIP1000 Ola Fosheim Grøstad via Digitalmars-d-learn
            • Re: DIP... Paul Backus via Digitalmars-d-learn
              • Re:... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Dukc via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
    • Re: DIP1000 Loara via Digitalmars-d-learn

Reply via email to