A
Alf P. Steinbach
* Cy Edmunds:
Consider that you will perhaps not ever know who is deriving from your
class.
Consider that you're writing library code.
The trust relationship has nothing to do with project teams.
That's a bit paranoid now, isn't it? I think the code should be maintable
with a any set of players. I don't think one should need to know them.
[snip]
A derived class (on the one hand) and so-called client code (on the other
hand) are two different kinds of client.
A derived class is a fully trusted client: you're giving it access to your
innards, and if it screws up then you (or it) is dead anyway.
A "trusted client"? That's where we disagree. Sure, over the next few months
you and your teammates will probably all be there and understandings and
agreements you have in place will work OK. But as time goes by people come
and go
Consider that you will perhaps not ever know who is deriving from your
class.
Consider that you're writing library code.
The trust relationship has nothing to do with project teams.
If your code is to still be maintainable with a new set of players
my advice is: don't trust anybody!
That's a bit paranoid now, isn't it? I think the code should be maintable
with a any set of players. I don't think one should need to know them.