• 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: NSArray vs. NSSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray vs. NSSet


  • Subject: Re: NSArray vs. NSSet
  • From: "Mike R. Manzano" <email@hidden>
  • Date: Thu, 10 Mar 2005 11:50:53 -0800

Aha, I tricked you into answering my question :)   Just kidding.

The question came up when I discovered there was an NSSet class, coupled with the fact that I've gotten away with using nothing but arrays and dictionaries in my code so far.

Anyway, back to your regularly scheduled programming.

	Mike


On Mar 10, 2005, at 11:45 AM, Shawn Erickson wrote:


This a trick question? ;-) The answer is when NSSet is a better fit for what you are doing then NSArray.


Review the docs for both classes and think about the difference on what they do, for example one allows you to access items primarily by index the other by object comparison, one is ordered the other isn't, one allows duplicate objects in the collection the other doesn't, etc.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSArray vs. NSSet
      • From: Tim Hart <email@hidden>
References: 
 >NSArray vs. NSSet (From: "Mike R. Manzano" <email@hidden>)
 >Re: NSArray vs. NSSet (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: NSArray vs. NSSet
  • Next by Date: Re: Mouse tracking rects
  • Previous by thread: Re: NSArray vs. NSSet
  • Next by thread: Re: NSArray vs. NSSet
  • Index(es):
    • Date
    • Thread