Wednesday, September 10, 2003

The Final Saga

Jeremy Dunck had the following to say on the pragrammatic programmers list:
>From: "Jeremy Dunck"
>Subject: Re: [pragprog] Whose word is final?
>Date: Mon, 08 Sep 2003 21:24:52 +0000
> >From: "Blaine Buxton"
> > >From: Ged Byrne
> > >In 'Effective Java' Bloch goes to the other extreme.
> > >
> > >His argument is that inheritance provides an
> > >additional interface to your objects. If you allow
> > >somebody to extend your objects in a way that you
> > >never imagined, then you are forced to either always
> > >support that unintended use for the entire life of the
> > >object or upset users of your interface when things
> > >change.
> >
> >I think making your objects all final is going way to far.
> >I have not found the changing
> >super class to a problem on any system that I've worked on. Good design
> >always makes things easier.
> >
>This conversation has been more enlightened than most I've seen on the
>topic, but here's an article that might help:
>Different strokes...
>I personally, as an in-house developer, -hate- banging my head on sealed
>classes. Significant project risk comes from this kind of surprise.
>Also... Regarding using mostly interfaces instead of actual class types in
>Java-- sounds like you want a dynamically-typed language.
> -Jeremy

Hmmm....You bet I want a dynamic language! I wonder which one I'm thinking of....=) I would have posted my reply, but someone beat me to it.

No comments: