2011/12/11 bearophile <bearophileh...@lycos.com>:
> kenji hara:
>
>> It breaks IFTI rule,
>
> What do you mean?

I mean following code comment will not become true.

void func(T)(T prm){}
void main(){
   X arg;
   func(arg);  // T is deduced to typeof(arg)
}

>
>
>> and adding special case will make difficult to learn language.
>
> I think that change proposed by Andrei A. (that I like) doesn't add a special 
> case to D2. Currently (2.057beta) this works:
>
>
> void main() {
>    immutable(int[]) a = [1, 2];
>    immutable(int)[] b = a;
> }
>
> Calling a function that accepts a immutable(int)[] with a immutable(int[]) 
> means creating a local slice, it's similar. So I think Andrei A. removes a 
> special case.
>
> Bye,
> bearophile

Reply via email to