Oct. 15, 2010
3:52 p.m.
---- On Fri, 15 Oct 2010 07:41:24 -0700 Guillermo Polito wrote ----
BTW, why Stack inherits from LinkedList instead of just using it? Should an Stack have the entire Collection protocol? I don't think so...
That was the subject of the earlier discussion, and yes, I think it should implement all appropriate messages in Collection, including #add: (as #push:), #size and #do:. The Array-based Stack I wrote does not implement #remove:ifAbsent: and only supports removal at the top of the Stack through #pop.