• 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: Newbie Question: implementing a stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Newbie Question: implementing a stack (From: Steve Wetzel <email@hidden>)
 >Re: Newbie Question: implementing a stack (From: Ricky Sharp <email@hidden>)
 >Re: Newbie Question: implementing a stack (From: Steve Wetzel <email@hidden>)
 >Re: Newbie Question: implementing a stack (From: Graham Cox <email@hidden>)
 >Re: Newbie Question: implementing a stack (From: Graham Cox <email@hidden>)
 >Re: Newbie Question: implementing a stack (From: Steve Wetzel <email@hidden>)

  • Prev by Date: Re: selectionShouldChangeInTableView called twice
  • Next by Date: Re: selectionShouldChangeInTableView called twice
  • Previous by thread: Re: Newbie Question: implementing a stack
  • Next by thread: Re: Newbie Question: implementing a stack
  • Index(es):
    • Date
    • Thread