Implicit conversions to immutable in the following two functions feel harmless. Has this been discussed before?

string foo()
{
    char[] s;
    return s;     // Error: cannot implicitly convert expression
                  //        (s) of type char[] to string
}

string bar()
{
    char[] s;
    return s ~ s; // Error: cannot implicitly convert expression
                  //        (s ~ s) of type char[] to string
}

Is there a reason why that's not possible? I am sure there must be other cases that at least I would find harmless. :)

Ali

Reply via email to