Re: Where is NSList?
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.