in reply to Re: Re: inheritance and object creation
in thread inheritance and object creation
Once you decide to use @ISA, you limit choices on how to model things. Your implementation of a Square has to be the same as your implementation of a Parallelogram. Which is an inconvenient implementation of a Square.Why does the implementation of a square to be the same as one of a parallologram? That's not why how one typically uses inheritance. An implementation of a base class is different than one of a super class - otherwise, there would not be a point in using inheritance. A base class and a super class typically share part of their implementation - and sometimes everything of a super class is inherited by a base class; that is, the base class doesn't redefine any method, or mask any attribute, of the super class.
As for a parallelogram being inconvenient as an implementation of a square, I'm kind of flabbergasted. I cannot think of any property a parallelogram has, that a square hasn't.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: inheritance and object creation
by tilly (Archbishop) on Feb 25, 2004 at 16:05 UTC |