On 20/02/2022 23:39, Paolo Redaelli wrote:
Wise words. I always wondered if "inherit {NONE}" is non conforming
inheritance, what's the meaning of "inherit {ANY}" or inherit
"{SOME_OTHER_CLASS}" ?
* inherit {NONE}: inheritance link (i.e. conformance) visible
by no class. No client knows that the current class inherits
from its parent, and therefore we cannot use this property
when trying to figure out whether the type of the source of an
assignment appearing in the client class conforms to the type
of the target.
* inherit {ANY}: inheritance link visible by all classes.
* inherit {SOME_OTHER_CLASS}: inheritance link visible only
by descendants of class SOME_OTHER_CLASS.
It's not very different from the notions 'feature {FOO}' or
'create {FOO}' where the feature or creation procedure is visible
only to descendants of class FOO, or to no class if FOO is NONE,
or to all classes if FOO is ANY.