Re: Where is NSList?
Re: Where is NSList?
- Subject: Re: Where is NSList?
- From: Allan Odgaard <email@hidden>
- Date: Wed, 28 Jul 2004 00:25:26 +0200
On 28. Jul 2004, at 0:07, Tim Conkling wrote:
The reason NSArray/NSMutableArray doesn't work for my purposes is
because there is no way for an object in an NSArray to know where its
position in that NSArray is (unless I'm missing something), and for
that information to remain accurate after the array is modified. This
is a feature that is provided by, for example, the STL with its list
and map templates, through the use of iterator objects.
Only std::list offers this, the rest of the STL doesn't.
However, with Cocoa you always store pointers to objects in contrast to
STL, where you often store the objects inline. This means that the
storage for the actual data can change when the vector is resized,
which is not the case with Cocoa, so here you can just use the object
pointer.
So I see no need for the iterator indirection you are requesting?!?
_______________________________________________
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.