On Fri, 27 Aug 2010, Stéphane Ducasse wrote:
On Aug 27, 2010, at 6:32 PM, Levente Uzonyi wrote:
On Thu, 26 Aug 2010, Bart Gauquie wrote:
Hi list,
is there a specific reason Stack is extending from LinkedList, instead of using a LinkedList internally? To me, it seems that the protocol that LinkedList, SequenceableCollection, ... provides is not the protocol you expect from a Stack?
Any thoughts on this?
Originally it used encapsulation,
when where?
In Pharo 1.0 (and Squeak of course). Levente
but for some reason it was changed to use inheritance, probably for a "cleaner" system. IMHO the changes should be reverted.
I was not aware that Stack was a subclass of linkedList, it looks again subclassing versus subtyping. And subtyping is better.
Stef
Levente
Kind regards,
Bart
-- imagination is more important than knowledge - Albert Einstein Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein The true sign of intelligence is not knowledge but imagination. - Albert Einstein However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill
_______________________________________________ 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