Description
Context Parameters using Implicit Definitions implicit
Scala 2, have been reworked in Scala 3 as Given Instances given
. There is a decent amount of rewrite needed for migrating to Given Instances.
The official guide also mentions that Scala 3 allows the use of implicit
, and that the rewrite can be done in a phased manner. https://www.scala-lang.org/blog/2024/01/23/migration-to-scala-3.html
You might be wondering about all the new concepts and changes. For example, what should be done about implicit splits or enums? You don’t have to rewrite everything right away. Here and there, you can keep using the implicit keyword instead of given and using. The same applies to enums: you can keep using ADTs in the form of sealed traits with case classes and refactor to the new enums later.