DIP1000: The return of 'Extend Return Scope Semantics'
Dennis
dkorpel at gmail.com
Sat May 29 11:32:50 UTC 2021
On Tuesday, 25 May 2021 at 11:24:59 UTC, Dennis wrote:
> We want to express:
> ```D
> // ┌─────────>─────────┐
> void move(T)(return T source, ref scope T target)
> ```
Here's a simple extension idea:
https://github.com/dlang/dmd/pull/12601
Simply skip over `return` parameters when looking for the 'first'
parameter, since making a `return` parameter its own destination
has no use. It's still constraining the parameter order, but may
be good enough to move forward with `move`.
More information about the Digitalmars-d
mailing list