Comparing Instances of Classes

DRex via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 10 20:27:26 PST 2017


On Friday, 10 March 2017 at 20:27:09 UTC, Meta wrote:
> 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.

I must be losing my mind then


More information about the Digitalmars-d-learn mailing list