mauro3 / SimpleTraits.jl

Simple Traits for Julia
MIT License
157 stars 14 forks source link

sub-trait, intersected-trait #12

Open JeffreySarnoff opened 7 years ago

JeffreySarnoff commented 7 years ago

Need to consider whether it makes sense to have subtraits or whether an intersection would be better.

Without considering the interapplication of types, some uses differ. This arises from parentage, a subtrait has one parent and an intersected trait has one or more parents. Both can be used to specialize; subtrait specialization constrains the expression of its parent and ?intertrait specialization expresses the constraint of its parents.

mauro3 commented 7 years ago

Note that traits can have several super-traits.