On 8/21/06, Timothy Hunter <TimHunter / nc.rr.com> wrote:
> Austin Ziegler wrote:
> > On 8/21/06, Tim Hunter <sastph / sas.com> wrote:
> >> Just Another Victim of the Ambient Morality wrote:
> >> >     Is there a reason why you don't simply inheret from Hash, or is
> >> this
> >> > just another one of those There's More Than One Way To Do It
> >> scenarios?
> >> "Favor composition over inheritance" - Design Patterns
> >> http://www.artima.com/lejava/articles/designprinciples4.html
> >
> > Which is ... questionable advice in Ruby. Since mixins are a *form* of
> > inheritance.
> >
> > -austin
> Interesting. And I've read on this list many times that inheriting from
> a builtin class like Hash is A Bad Thing. Are you saying that I should
> stop feeling guilty for deriving Magick::Image from Array? :-)

Is derivation the best choice, or is delegation the best choice? I
don't know, personally. It's always a tough choice, because an Image
is just an array of bytes with special interpretation (but one could
say that of *any* object, I guess).

-austin
-- 
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca