Re: final methods and classes
Andreas Leitgeb wrote:
Mike Schilling <mscottschilling@hotmail.com> wrote:
Do you really not know what I mean? Fine I'll be more explicit.
I do think I did understand you, but I think you see it too narrow.
Whatever you said about non-documented (by experimentation) uses of
a particular API apply to plain use as well as to subclassing.
In any way it's not the vendor's "duty"/obligation to do anything
more than place a note in the doc warning against subclassing some
class, to be free to change undocumented features, later, at will.
Either way, A should be defined as final. Becasue the alternative
is
that V2 of the library can break existing clients.
But only those who "deserve" it, for not following the docs, and
quite
likely not even all of them.
If I thought that "The docs tell you not to do that, therefore you
have no right to complain when it doesn't work" was effective, well, I
probably wouldn't have worked in software for thirty years. Actually,
I spent much of last week helping a customer who'd fouled up their
persistent storage by doing two things that we specifically document
as not supported. They're an important one, so saying "You made your
bed, now lie in it" was not an option.