[jdom-interest] Re: Interfaces? (was: W3 DOM support)
David W. Smiley
dsmiley at mitre.org
Mon Aug 7 06:32:10 PDT 2000
> > And I'm not a big fan of subclassing. I'd rather delegate. To my mind,
> > subclassing is a fragile, often requiring intimate knowledge of the
> > source code and leaving oneself vulnerable to future revisions of the
> > base classes.
>
> Hear, hear! Inheritance is OOP for the weak! Delegation rules.
Excuse me? This statement suggests inheritance has no purpose.
On the side, I agree with what Jason had to say in this thread, BUT I do
think there should be one 'builder' that can be replaced that generates
the various JDOM classes. The existing "Element" etc. classes would
have a package or protected constructor. The advantage of a 'builder'
is that users can substitute implementations that offer features like
observers or whatever. It would be fun for me to go off and
re-implement JDOM to how I would do it to see what everyone thinks. I
don't think it'd be that hard.
-- David Smiley
More information about the jdom-interest
mailing list