Mixin inheritance clarification - #270
Conversation
| - the value of `c.is_a` must be a ClassDefinitionReference | ||
| - the value of `c.mixins` must be a collection of ClassDefinitonReferences | ||
| - For any parent `p` of `c`, if `p.mixin` is True, then `c.mixin` SHOULD be True | ||
| - for any direct (`is_a`) ancestor `a` of `c`, if `a.mixin` is True, then `c.mixin` SHOULD be True |
There was a problem hiding this comment.
"direct ancestor" is a bit of a contradiction, so better use the word "parent" (I dont mind the redundant "direct"):
| - for any direct (`is_a`) ancestor `a` of `c`, if `a.mixin` is True, then `c.mixin` SHOULD be True | |
| - for any direct `is_a` parent `a` of `c`, if `a.mixin` is True, then `c.mixin` SHOULD be True |
| - the value of `s.is_a` must be a **SlotDefinitionReference** | ||
| - the value of `s.mixins` must be a collection of **SlotDefinitionReference**s | ||
| - For any parent `p` of `s`, if `p.mixin` is True, then `s.mixin` SHOULD be True | ||
| - for any direct (`is_a`) ancestor `a` of `s`, if `a.mixin` is True, then `s.mixin` SHOULD be True |
There was a problem hiding this comment.
| - for any direct (`is_a`) ancestor `a` of `s`, if `a.mixin` is True, then `s.mixin` SHOULD be True | |
| - for any direct `is_a` parent `a` of `s`, if `a.mixin` is True, then `s.mixin` SHOULD be True |
gouttegd
left a comment
There was a problem hiding this comment.
(Asked to review by @matentzn )
(i) I agree with the assessment in the original ticket that the current phrasing in the spec is wrong, as it would indeed imply that any class that uses a mixin (has a mixins parent) should itself be a mixin, which wouldn’t make any sense.
(ii) I agree with @matentzn ’s objection regarding the use of “direct ancestor” as a way to refer to a “is_a parent”. This is not how most people would understand such a term. In the absence of any established terminology to distinguish between “parent through a is_a relationship” and “parent through a mixins relationship”, better to always be explicit and to always talk about “is_a parent” and “mixins parent”.
So overall, agreeing with the general idea, but requesting the changes suggested by @matentzn.
Closes linkml/linkml#3849