Hi all,

I'm somewhat confused regarding the difference between the isEqual: and the isEqualTo: defined in the NSObject interface. What's the difference and is there a penalty paid when using isEqualTo: instead of isEqual:?

So far, I've been mostly using isEqualTo: since it was the intuitive thing to write (having well internalized the Cocoa naming scheme ;-) I'm now a little concerned whether this might have side effects compared to using isEqual: ...


From the documentation, I can't really tell whether there are just two separate implementations or whether one just calls the other - I can only assume that isEqual: is the actual implementation, whereas isEqualTo: , since it's declared in NSScriptWhoseTests.h was really added for scripting support, but IMHO, it doesn't make sense to add a new name (which, BTW, isn't even scripting specific) just for this, so I also have to assume that it's really just an alias for isEqual:, i.e. it just calls isEqual: in the default implementation(s)?

Why would one have to methods that apparently don't do things really differently and which both seem to be generic enough to not be tied to a certain operational area (like e.g. scriptingIsEqualTo:, which obviously is tied to scripting support)?

If anybody could shed some light on this, I'd really appreciate.

Thanks,
-jens

verinnerlicht
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to