mlimber wrote:
Victor Bazarov wrote:
Tony Johansson wrote:
When you have result covariance is it then necessary that you have
inheritance.
I mean can you have result covariance without having inheritance.
"Covariance" by definition requires inheritance. Is it necessary for
a bicycle to have wheels?
But, Victor, that's "has-a" inheritance! Surely, you meant something
like "Is it necessary for a bicycle to be a mountain bike?" ;-)
I think you're confusing what my analogy is for. It is necessary by
definition for a bicycle to have wheels to be a bicycle. It is necessary
by definition for covariance to involve inheritance. I wasn't implying
that a bicycle was covariant with wheels. Yes, a mountain bike would
probably be covariant with a bike if it inherited from it publicly.
V