in reply to Re: New Module Consideration?
in thread New Module Consideration?

I think people should think about aggregation far more often than about inheritance. A has-a relationship is very likely to be more appropriate than an is-a one when the desired interface differs significantly from what the existing class already offers.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: New Module Consideration?
by djantzen (Priest) on Jan 01, 2003 at 03:12 UTC

    I agree, if the interface is going to be drastically different then you should not try to subclass. To do so would probably involve overriding the parent's methods with dummy placeholders to prevent the user from accessing inherited but unwanted behavior. In this case though, I'd be surprised if it were not possible to expand the interface to allow extensible argument checking via this newrule method he's proposing, without breaking compatibility with the parent module. But if I'm wrong I fall back on my original caveat :^p