[Issue 19097] Extend Return Scope Semantics
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 1 06:01:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19097
--- Comment #12 from Mike Franklin <slavo5150 at yahoo.com> ---
I'm wondering if it might be possible to do something like this:
```
void betty(ref scope int* r, return(r) scope int* p)
{
r = p;
}
```
`return(r)` explicitly ties p's lifetime to r's.
So, the `return` attribute would take an argument specifying which "output"
parameter to tie the input lifetime to, and the semantics no longer rely on
convention or the order of arguments.
--
More information about the Digitalmars-d-bugs
mailing list