• 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: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)


  • Subject: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
  • From: Malte Tancred <email@hidden>
  • Date: Wed, 9 Jun 2004 09:36:09 +0200

On 7 jun 2004, at 23.43, Patrick Machielse wrote:
op 07-06-2004 14:20 schreef Alastair Houghton
MyObject fulfils all of the requirements stated for -isEqual: and -hash, and
it is the *NSDictionary* that is storing a different key to the one that it
was given, *not* the user.

The code above will work for a well designed key class. It is the user that
broke the implicit 'copy is equal' contract for MyObject.

Yes, according to the documentation of NSDictionary. But that's exactly
what's being discussed. Marcel objects to the design of NSDictionary.

Someone mentioned the word elegance, hoping that _it_ was not what this
discussion was all about. In my experience, programming is all about
elegance. If introducing an NSDictionary superclass that would function
the way Marcel advocates indeed elevates the elegance of the Foundation
kit, that introduction should definitely be made; If changing the
behaviour of NSDictionary to agree with what Marcel suggests, and at
the same time introducing a subclass with an intention-revealing name
(ie, revealing the current NSDictionary behaviour) would elevate the
design even more, then that change should be made instead.

Regards,
Malte

--
Malte Tancred
Computer Programmer
Oops AB, http://oops.se/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!) (From: Patrick Machielse <email@hidden>)

  • Prev by Date: Re: Word count
  • Next by Date: DO: threads deadlock when sending oneway messages to each other
  • Previous by thread: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
  • Next by thread: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
  • Index(es):
    • Date
    • Thread