Can there be support for multiple inheritance please? While even languages like Java & C# support for multiple inheritance via Interfaces, it will be a powerful & necessary feature for a knowledge graph.
We have actually been going back and forth on this one for a while. The conclusion we keep hitting is that we will implement it only when we truly need it because while it is a powerful feature it does add some complexity to the model.
What’s been stopping us from diving into this is that we can’t think of an example that cannot be modeled with the current single inheritance constraint. Do you have such an example in mind? If so that would probably expedite the feature.
Correct me if I’m wrong, but using Grakn’s model this could be achieve by assigning multiple roles to the same entity right ? if you define it in a hierarchical way, (with
car sub vehicle;), is it possible to inherit from multiple entities?
Yes that is 100% correct! and thank you for clarifying the issue. Grakn allows multiple inheritance as long as its from the same “branch”. In other words this works:
insert vehicle sub entity; car sub vehicle; smaller-car sub car;
However, this does not:
insert vehicle sub entity; car sub entity; smaller-car sub vehicle; smaller-car sub car;
In the latter case
smaller-car will not inherit from both but will first be a
vehicle and then be changed to a