D
Dave
Hello all,
The methodology of policy-based design states that one should inherit from
policy classes and, of course, these classes must provide an agreed-upon
public interface and semantics.
I would like to understand better why inheritance, rather than containment,
is espoused. The only things I can see that inheritance provides beyond
containment is the possibility of polymorphism and access to protected
members. Since neither of these are needed when trying to gain access to
the functionality of a policy class, why is inheritance espoused over
containment?
Thanks,
Dave
The methodology of policy-based design states that one should inherit from
policy classes and, of course, these classes must provide an agreed-upon
public interface and semantics.
I would like to understand better why inheritance, rather than containment,
is espoused. The only things I can see that inheritance provides beyond
containment is the possibility of polymorphism and access to protected
members. Since neither of these are needed when trying to gain access to
the functionality of a policy class, why is inheritance espoused over
containment?
Thanks,
Dave