在阅读
Scala源代码时,我在scala / package.scala中遇到了以下内容
我不太明白为什么我们需要特质和val同时. trait关键字将为该类别名,那么为什么我们需要val呢?
我不太明白为什么我们需要特质和val同时. trait关键字将为该类别名,那么为什么我们需要val呢?
type StringBuilder = scala.collection.mutable.StringBuilder val StringBuilder = scala.collection.mutable.StringBuilder // Numeric types which were moved into scala.math.* type BigDecimal = scala.math.BigDecimal val BigDecimal = scala.math.BigDecimal type BigInt = scala.math.BigInt val BigInt = scala.math.BigInt type Equiv[T] = scala.math.Equiv[T] val Equiv = scala.math.Equiv