Back to Developer Roadmap

Conversions

src/data/roadmaps/scala/content/[email protected]

4.0942 B
Original Source

Conversions

Implicit conversions allow the compiler to automatically convert one type to another in certain situations. In Scala 3, implicit conversions are defined by a given instance of type scala.Conversion[S, T], where S is the source type and T is the target type. In Scala 3.8+, the into keyword is used to mark types that can be implicitly converted. If the expected type of an expression is into[T], then an implicit conversion to that type can be inserted without the need for a language import.

Visit the following resources to learn more: