Comparing Instances of Classes
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Mar 10 12:27:09 PST 2017
On Friday, 10 March 2017 at 17:08:42 UTC, Whatsthisnow wrote:
> I guess i am just too used to the java way of x.equals(object)
> which at the source is exactly 'return this == object'
Java would return false here too, though, if it actually did
`this == object` in its default compare method. If I remember
correctly, comparing two objects with == in Java compares their
addresses, not their contents.
More information about the Digitalmars-d-learn
mailing list