Re: Differences between -isEqual: and -isEqualTo:?
Re: Differences between -isEqual: and -isEqualTo:?
- Subject: Re: Differences between -isEqual: and -isEqualTo:?
- From: Seth Willits <email@hidden>
- Date: Thu, 18 Sep 2008 15:13:30 -0700
On Sep 18, 2008, at 2:59 PM, Dave DeLong wrote:
IIRC, isEqual: compares memory addresses, whereas isEqualTo:
compares hashes of the objects being compared. I also believe that
isEqual: is the preferred method.
isEqual: does not compare addresses. That's what == is for. Two
distinct arrays with the same elements are "equal". You use isEqual:
to test for that.
isEqualTo: is purely a synonym.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden