Print

Print


I suggest a reading of one of Bertrand Meyer's texts on Eiffel, particularly
"Object Oriented Software Construction, 2nd Ed." Be aware that in most
languages inheritance has two semantic aspects, a form of "macro" as a way of
implementing code based on similar code, and a form of "dynamic" dispatch that
assumes that similar code can be used in similar contexts. Restricting access
priveledges of inherited code is consistent with the first, but not the
second, aspect. Restricting access is acceptable provided inheritance can be
decoupled from polymorphism. Expanding access priveledges requires detailed
knowledge of the original source code, but is otherwise consistent with both
aspects of inheritance.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%