On 05/02/2012 05:25 PM, Andrei Alexandrescu wrote:
On 5/2/12 10:20 AM, Timon Gehr wrote:
The interface is different:

void main(){
    int[] a = [0,0,0];
    a[2] = 3;
    assert(2 !in a);
}

vs.

void main(){
    int[int] aa;
    aa[2] = 3;
    assert(2 in aa);
}

The syntactic interface is the same.

Encapsulation of complexity is a problem if it is not obvious to the programmer. I am not sure it can even be called such if the semantics is different.

That would be the semantic interface, which makes the idea twice as bad.

Andrei

I tend to agree, but I think that the two points are mutually exclusive.

Reply via email to