Inherit.jl

The main difference I can see is they don’t seem to verify method signatures. Their interface seems to be only checking for a function name?

Found this post about ObjectOriented.jl

This problem is avoided in Inherit.jl,

a = Apple(1,2)
a isa Apple && a isa Fruit
true

Before I developed Inherit.jl I had looked at Classes.jl. One of the issues was they used a parallel type hierarchy to what the user actually typed. It seems ObjectOriented.jl has a similar problem. Inherit.jl uses native Julia type hiearchy. It introduces no new types. There is no dispatch overhead at all.

This also restricts the current system from having multiple inheritance. MI will use parameterized container types and introduce the <-- operator. But the main object hierarchy is still the Julia one. MI introduces Traits that decorates on this hierarchy.

2 Likes