M
Michael Strorm
Hi,
I have some classes that are designed such that the subclass
implementations of foo() *must* call the super class implementation of
foo().
What is the best way of forcing this? I read somewhere that this is
poor design; but constructors not only allow it, they *require* it!
One solution I read is to use a decorator class, but this sounds like
gross overkill, and would probably make things even more error-prone.
Any thoughts?.. all help appreciated, thanks.
- MS
I have some classes that are designed such that the subclass
implementations of foo() *must* call the super class implementation of
foo().
What is the best way of forcing this? I read somewhere that this is
poor design; but constructors not only allow it, they *require* it!
One solution I read is to use a decorator class, but this sounds like
gross overkill, and would probably make things even more error-prone.
Any thoughts?.. all help appreciated, thanks.
- MS