标签:dynamic 导致 must without pil efi general stack multi
If you still do not know, after considering the above, then start by making it as a trait. You can always change it later, and in general using a trait keeps more options open.
trait t(i: Int) {}
,参数i
是非法的。super
calls are statically bound, in traits, they are dynamically bound.super.toString
in a class, you know exactly which method implementation will be invoked.REFERENCE
stackoverflow: Scala特质 vs 抽象类 , 抽象类和特质的区别, and Scala编程: 用特质,还是不用特质?
http://www.artima.com/pins1ed/traits.html
标签:dynamic 导致 must without pil efi general stack multi
原文地址:http://www.cnblogs.com/yumanman/p/7611101.html