• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Differences between -isEqual: and -isEqualTo:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Differences between -isEqual: and -isEqualTo:?


  • Subject: Re: Differences between -isEqual: and -isEqualTo:?
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 18 Sep 2008 17:44:48 -0700


On Sep 18, 2008, at 5:33 PM, Ken Thomases wrote:

Another counterexample is an object which doesn't provide value semantics. That is, its -isEqual: only tests identify (pointer comparison) and whose hash is purely based on the object pointer.

..or say a "person" object which is considered equal if two person objects have the same email address while all other attributes of the object (say phone number, first name, last name, etc.) are not a factor when considering equality. In this case you can safely mutate all properties of said person object except for email address if that object is being used in a collection (or data structure) that depends on hash or isEqual: for its storage and look up.


-Shawn

_______________________________________________

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


References: 
 >Differences between -isEqual: and -isEqualTo:? (From: Rick Mann <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Dave DeLong <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Charles Srstka <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Ken Thomases <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Keith Duncan <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: "Shawn Erickson" <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Jim Correia <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Keith Duncan <email@hidden>)
 >Re: Differences between -isEqual: and -isEqualTo:? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Listening for changes in a table
  • Next by Date: Re: Differences between -isEqual: and -isEqualTo:?
  • Previous by thread: Re: Differences between -isEqual: and -isEqualTo:?
  • Next by thread: Re: Differences between -isEqual: and -isEqualTo:?
  • Index(es):
    • Date
    • Thread