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

zjh fqbqrr at 163.com
Fri Nov 26 02:17:18 UTC 2021


On Friday, 26 November 2021 at 02:05:00 UTC, zjh wrote:

> why we don't use `&`?

```d
auto ref f3(ref int x) { return x; }
//VS
auto&f3(int&x){return x;}
```
one `inout` is enough:
```d
auto inout f3(inout int&x) inout{return x;}
//VS
auto what() return;
auto the() return scope;
auto fuck() return ref scope;
...
```



More information about the Digitalmars-d mailing list