On Monday, 29 December 2014 at 19:54:33 UTC, Steven Schveighoffer wrote:
On 12/29/14 2:04 PM, Dicebot wrote:
On Monday, 29 December 2014 at 19:00:06 UTC, Andrei Alexandrescu wrote:
I tend to agree. You seem to have shown that reusing inout for scope
information becomes confusing. -- Andrei

What is the problem with using inout exactly as it is now (== both for
argument and return type) but defining it to propagate aliasing
information as it is decribed in DIP25?

It can, and I don't have a problem for that.

But I think disallowing:

ref T foo(T)(ref T t) { return t;}

Is no good.

It is to be disallowed only in @safe code, right?

The DIP seems to be indicating inout can have another use that has nothing to do with const, but I'm not exactly sure.

I see its potential as a generic wildcard for attribute/qualifier propagation through the functions.

Reply via email to