Progopedia - encyclopedia of programming languages
BCS
none at anon.com
Mon Nov 23 19:06:37 PST 2009
Hello Phil,
> On the C++ page, I see:
>
> Physical (shallow) equality a == b
> Physical (shallow) inequality a != b
> Deep equality *a == *b (a and b are pointers)
> Deep inequality *a != *b (a and b are pointers)
> On the D page, I see:
>
> Physical (shallow) equality x == y
> Physical (shallow) inequality x != y
> Deep equality x is y
> Deep inequality x !is y
> I'm not sure which is right, but I don't think they can both be right
> as "x is y" is more like "x == y" in C++ than "*x == *y". I might be
> wrong here; as I am a bit confused about this.
>
I think you are correct "is" in D does to pointers what "==" does in C++.
More information about the Digitalmars-d-announce
mailing list