可能重复:
scala 自类型和特征子类之间有什么区别?
我无法区分以下两个代码块:
// Trait B is mixed in and creates a dependency on it
trait A extends C with B {
...
}
// Trait B is put in scope and also creates a dependency on it
trait A extends C {
self: B =>
...
}
我是从设计的角度来问的。
谢谢!