• 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: Where is NSList?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is NSList?


  • Subject: Re: Where is NSList?
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 28 Jul 2004 20:01:28 +0200

On 28. Jul 2004, at 7:57, Chris Hanson wrote:

That is probably why close to no methods take an NSEnumerator as argument ;)
Well, of course not. Why would something that operates on a collection take an enumerator as an argument? Then it would be operating on the enumerator, not the collection.

Because it allows for much more flexibility. Every container can be represented as an enumerator, but an enumerator can represent much more than just a container.

And you'd then have more generic methods, i.e. instead of "setWithObjectsFromArray:", "arrayWithObjectsFromArray:" etc. you'd just have one constructor taking an enumerator.
_______________________________________________
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: 
 >Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: Kay Roepke <email@hidden>)
 >Re: Where is NSList? (From: Allan Odgaard <email@hidden>)
 >Re: Where is NSList? (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Where is NSList?
  • Next by Date: Re: Right arrow keypress == enter keypress in NSTableView subclass?
  • Previous by thread: Re: Where is NSList?
  • Next by thread: Re: Where is NSList?
  • Index(es):
    • Date
    • Thread