Say I have a number of trait
s that each add some behaviour to classes that extend Actor
.
They each require a small subset of the methods on Actor
. Is it ok for them all to extend Actor
like this?
trait A extends Actor {
def doAThing = { ... }
}
trait B extends Actor {
def doBThing = { ... }
}
trait C extends Actor {
def doCThing = { ... }
}
class D extends Actor with A with B with C
Or should each trait define the methods it needs from Actor
as abstract methods such that they are supplied by the final, concrete class, which is the only one that will then extend Actor
?