Re: Newbie Question: implementing a stack
Re: Newbie Question: implementing a stack
- Subject: Re: Newbie Question: implementing a stack
- From: Graham Cox <email@hidden>
- Date: Sun, 21 Dec 2008 11:12:49 +1100
On 21 Dec 2008, at 10:52 am, Steve Wetzel wrote:
I guess can simply assign the pointer, but if I do, it seems to me I
will need an NSMutableArray to hold myObj1... myObj10 (or more). If
I do that, what benefit is the stack?
I don't really follow your argument. Presumably you decided you need a
stack for some reason to do with your application's logic - so I can't
answer "what benefit is the stack?" - that's up to you!
A stack in general terms doesn't inherently copy items placed on it,
there's nothing in the definition of 'stack' that implies a copy. It's
just storage, with a LIFO semantic.
I don't really see what creating objects has do with it - the stack is
to do with organising objects, not creating them.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden