「 Scala 」一覧

Scalaのextendsとself type annotationの差異

Scalaのextendsとself type annotationの差異

Scalaのextendsとself type annotationの区別は、「実際に拡張している(actually extending)」と「まだ拡張していない(doesn't extend it yet)」の差異に対応する。 生成時点では、双方の機能に大差は無い。しかし単体水準のテストを可能にするという問題設定においては、self type annotationは「依存性注入(Depen...