Andrei Alexandrescu wrote:
Any thoughts would be appreciated.

The more I think about this, the more I think it cannot work unless inout is elevated to be a full type constructor, just like const, immutable, and shared are.

For example:

inout(char[]) foo(inout char[] p)
{
    char[] s = p;
    return s;      // ulp, doesn't work

    const char[] s = p;
    return s;      // ulp, doesn't work

    immutable char[] s = p;
    return s;      // ulp, doesn't work

    auto s = p;
    return s;      // ulp, doesn't work
}

Reply via email to