On Wed, Jan 28, 2004 at 03:18:24PM +0300, Dmitry Dorofeev wrote:
> I am not very good at OO but I tried at least 2 times to develop with it 
> though :-)
> Last time it was Java. The problem is that when i going to use some 
> 'standard' class
> or 3d party class i'd rather to cut off all unnecessary methods (and may be 
> even properies!),
> then adding my own. I know it kills inheritance but it is much more to my 
> Perl habit of hacking code.

There's little benefit to explicitly stubbing out inherited methods you 
don't plan to use, just don't use them.  Its not worth screwing up
the language's inheritence model with an explicit way to have a subclass 
not implement its parent's interface.

I suspect that if you find yourself only needing a small fraction of your
parent's interface often, inheritence might not be the right thing.  Consider
delegation instead.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
You're more radiant than a memory of breathtaking ecstasy.

Reply via email to