Re: [Pharo-project] Stack should be reimplemented with Array
Thanks!!! Stef On Oct 14, 2010, at 8:32 PM, jaayer wrote:
The original contains an error; it send min: where it should max:. This one contains the correction.<Stack.st>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
BTW, why Stack inherits from LinkedList instead of just using it? Should an Stack have the entire Collection protocol? I don't think so... On Thu, Oct 14, 2010 at 5:31 PM, Stéphane Ducasse <Stephane.Ducasse@inria.fr
wrote:
Thanks!!!
Stef
On Oct 14, 2010, at 8:32 PM, jaayer wrote:
The original contains an error; it send min: where it should max:. This one contains the correction.<Stack.st>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
---- 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.
participants (3)
-
Guillermo Polito -
jaayer -
Stéphane Ducasse