From: John Wilger Date: 2007-03-16T11:00:05+09:00 Subject: Re: General Ruby OOP Question - using inheritance or include for shared attributes On Mar 15, 7:21 am, "Trans" wrote: > Sure. You can do all sorts of tricks to get the desired behavior. The > point is simply "it ain't natural". I guess that's subjective. I find it completely "natural". :-) > > Really, the choice of whether to use inheritance or module inclusion > > comes down to the question of whether you are sharing identity or just > > behavior. For instance, do you want: > > There's a duck around here that doesn't know the difference ;-) The duck might not, but the programmer does. The difference between identity and behavior can make a complex domain easier to grok if used appropriately. Note that I am /not/ a proponent of static typing, and /am/ a proponent of duck typing. The issue of inheritance vs. inclusion that I mentioned regards human understanding of the code rather than the compiler's.