Mixers.jl
Mixers.jl copied to clipboard
Could @Premix and @mix be linked to an abstract type?
Someithing like:
abstract type Drink
@premix @with_kw struct Fruitjuice{P,B} {link to Drink}
pommegranite::P
orange::B
end
@mix @with_kw struct Soda{J} {link to Drink}
soda::J = 2u"L"
end
So that
struct Punch{L} <: Drink
vodka::L
end
would be equivalent to
@Fruitjuice @Soda struct Punch{L}
vodka::L
end
Sorry If I've misunderstood the proper usage.
No... mixins can be combined and Julia doesn't have multiple inheritance.