The scala.language object controls the language features available to the programmer, as proposed in the SIP-18 document.
scala.language
Each of these features has to be explicitly imported into the current scope to become available:
import language.postfixOps // or language._ List(1, 2, 3) reverse
The language features are:
dynamics
Dynamic
postfixOps
reflectiveCalls
implicitConversions
higherKinds
existentials
experimental
and, for dotty:
Scala2
noAutoTupling
The
scala.language
object controls the language features available to the programmer, as proposed in the SIP-18 document.Each of these features has to be explicitly imported into the current scope to become available:
The language features are:
dynamics
enables defining calls rewriting using theDynamic
traitpostfixOps
enables postfix operatorsreflectiveCalls
enables using structural typesimplicitConversions
enables defining implicit methods and membershigherKinds
enables writing higher-kinded typesexistentials
enables writing existential typesexperimental
contains newer features that have not yet been tested in productionand, for dotty:
Scala2
] backwards compatibility mode for Scala2noAutoTupling
disable auto-tupling