On Aug 20, 2009, at 9:09 PM, Jeff Laing wrote:

If you need to know whether or not another object has put your object
into an NSDictionary, you're probably doing something wrong.  Do you
have a specific concern about Core Data using your objects ?

No, I guess the point I was trying to make was that this discussion seemed to have touched on "if you put your objects into an NSSet then you'll need to be more careful about the implementation of - hash, etc". I was trying to point out that just because my application code doesn't go anywhere near NSSet, its conceivable (to me) that Core Data (for example) might be storing dirty objects in an NSSet "behind your back". So you can't "not implement -hash, etc properly" and hope everything will work.

There may be any number of "external" technologies (Core Data was just an example) that may be using your objects in ways you aren't expecting, and there's no future-proof way you can cut corners.

There really isn't any point in cutting corners here. If you need to do something unusual, you can use a CFDictionary with custom callbacks.

- Ben



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to