The closest thing you can do is split your functionality into traits and split them into separate files:
class MainClass extends Functionality1, Functionality2
trait Functionality1 {
self: MainClass =>
}
trait Functionality2 {
self: MainClass =>
}
Note that by using self-type and setting it to MainClass, you guarantee that every attribute can refer to all elements that will eventually be mixed with MainClass.
source
share