Re: case-insensitive NSDictionary
Re: case-insensitive NSDictionary
- Subject: Re: case-insensitive NSDictionary
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 16 Mar 2009 10:15:47 -0700
On Mar 16, 2009, at 8:57 AM, Paul Sanders wrote:
Why not just subclass NSDictionary to do this? Seems
straightforward to me.
That would certainly be viable. I made a different assumption than
you; namely that the strings should continue to hash and isEqual: as
case insensitive outside of the specialized collection. Your
assumption is that the behavior is only needed in the collection.
Both assumptions are perfectly valid and it is entirely up to the OP
to determine which is required.
What is swizzling?
The Objective-C runtime is truly dynamic in that it provides all of
the API to define new classes and **edit existing classes** at runtime.
Swizzling is the act of replacing a method implementation with a new
implementation which possibly calls through to the original
implementation.
It is extremely useful for debugging, but should never be used in
production systems in anything but as a last resort and, even then,
only after putting in the protections necessary to limit it to
particular releases of whatever it is being swizzled.
Swizzling breaks implementation encapsulation and, thus, is
exceedingly fragile.
b.bum
_______________________________________________
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