3 ms·
Implicits are very powerful when used tastefully but are being replaced/deprecated in Scala 3 regardless.
by halfmatthalfcat 7y ago
Implicits are very powerful when used tastefully but are being replaced/deprecated in Scala 3 regardless.
- virtualwhys 7y agoActually, implicits aren't going anywhere in Scala 3. There will be new syntax, but otherwise the underlying semantics will remain the same; it's just the implicit keyword itself and the kitchen sink of functionality that it provides in Scala 2 will be split up into new (soft) keywords like "given foo(using: Bar) = ..." rather than "implicit def foo(implicit bar: Bar) = ...", along with "extension listOps of" replacing "implicit class ListOps ...". The community isn't united over the proposed changes (mostly due to migration concerns it seems), but overall it looks like a nice improvement over the status quo, particularly around typeclass definitions.