How do model a sub type that can fall under two different abstract types?

Just answered this in another thread: Why use subtypes instead of traits and duck typing? - #31 by Raf

You can do a kind of multiple inheritance with subtyped traits. Edit: But this is probably overcomplicating things normal traits are all you need here.

You could also use regular object composition and multiple dispatch.

2 Likes