On 12/29/14 8:09 AM, Steven Schveighoffer wrote:
On 12/29/14 10:51 AM, Andrei Alexandrescu wrote:
On 12/29/14 6:07 AM, Steven Schveighoffer wrote:
On 12/27/14 10:09 PM, Andrei Alexandrescu wrote:
Walter and I have been working on revamping DIP25, which focuses on
tightening the screws of ref. This should then simplify DIP69
significantly.

Please comment: http://wiki.dlang.org/DIP25

ref int hun() inout { return b; }

This doesn't make sense. inout cannot cast to mutable.

Yah, the DIP should clarify that new behavior. Thanks. -- Andrei

Huh? This behavior cannot be allowed.

If we can return mutable ref to a member when calling a member function
on a const or immutable object, then we are in violation of const.

What is the point of the above? in such a function, what is typeof(this)?

Even if you can make up rules to make this sane, it's going to be
boatloads more confusing than today's situation with inout.

I tend to agree. You seem to have shown that reusing inout for scope information becomes confusing. -- Andrei

Reply via email to