[Newbies] RE: RE: delegation vs inheritance

gruntfuttuck gruntfuttuck at gmail.com
Mon Aug 6 09:36:20 UTC 2007

Hi Ron

Sorry for the confusion. I'm just using Stack as an example, I don't need to
use it. I'm just curios of the design choose between delegating (or
forwarding) vs inheritance. Couldn't Stack inherit from LinkedList and
specialize it. I'm not questioning the design choose but just trying to
learn how to make good design decisions. 

Regards, Darren

Ron Teitelbaum wrote:
>> From: Darren
>> from: Ron Teitelbaum
>> >Does that help?
>> >Ron
>> Thanks Ron, yes that does help but also what would be the thought process
>> (I
>> know you can't read minds) to choose this approach as apposed to
>> specializing StackLink?
>> -Regards Darren
> I don't understand your question.  What are you trying to do or which
> thought process doesn't make sense?  
> If you are trying to provide a linked list then you should use Link.  If
> you
> need a stack use Stack.  Have a look at the methods on each class and you
> can see how each class has been specialized.  That should give you an idea
> of which class meets your needs.  (If you don't find a method you need on
> Link, but it's on stack then use Stack)
> I think it would be easier if you said more about what you would like to
> do
> or what you do not understand.  I'm sure someone can help explain it.  I'm
> still not sure what piece you are having difficulty with.
> Welcome Darren!
> Ron
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

View this message in context: http://www.nabble.com/delegation-vs-inheritance-tf4216781.html#a12013376
Sent from the Squeak - Beginners mailing list archive at Nabble.com.

More information about the Beginners mailing list