DIP1000: Walter's proposal to resolve ambiguity of ref-return-scope parameters

WebFreak001 d.forum at webfreak.org
Thu Nov 25 15:57:13 UTC 2021


On Wednesday, 24 November 2021 at 23:50:13 UTC, Dennis wrote:
> 5 months ago I described an issue with `ref return scope` 
> parameters:
> [DIP1000: 'return scope' ambiguity and why you can't make 
> opIndex 
> work](https://forum.dlang.org/post/nbbtdbgifaurxoknyeuu@forum.dlang.org)
> (N.b. in struct member functions, the `this` keyword is a `ref` 
> parameter)
>
> [...]

with `return ref` and `return scope`, will there also be a 
`return this` for the case like the opIndex functions returning 
something with the lifetime of the containing struct? I don't 
quite get how it's otherwise fixing it.


More information about the Digitalmars-d mailing list