Skip to content

Commit 1388efd

Browse files
Remove the macro section
1 parent 9b75f57 commit 1388efd

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

docs/blog/_posts/2020-06-16-25th-dotty-milestone-release.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ Alternatively, you can try this version of Scala online via [Scastie](https://sc
1515
Enjoy the ride🚀!
1616

1717
<!--more-->
18-
# Progress on macro compatibility with Scala 2
19-
One of the most challenging parts of the migration from Scala 2 to Scala 3 are macros. Scala 3 has re-implementing the entire metaprogramming mechanism from scratch, and so all the Scala 2 macros must also be rewritten from scratch using the Scala 3 metaprogramming capabilities.
20-
21-
Under these conditions, cross-compilation of a library between Scala 2 and Scala 3 also becomes more challenging since you need to split your sources between the two versions.
22-
23-
To address this challenge, we are currently working on a solution to allow macro definitions of Scala 2 and Scala 3 macros to reside in the same file. This co-habitation will look as follows:
24-
25-
```scala
26-
object Macro1 {
27-
import scala.language.experimental.macros
28-
def lineNumber: Int = macro LineNumberMacroScala2.thisLineNumberImpl
29-
inline def lineNumber: Int = ${ LineNumberMacroScala3.thisLineNumberExpr }
30-
}
31-
```
32-
33-
Currently, this is a work in progress. You can dive deeper into the current state of things by looking at PR [#8811](https://github.com/lampepfl/dotty/pull/8811).
34-
3518
# Avoid excessive slowdowns when suggesting missing imports in error messages
3619
Dotty brings to the user an enhanced error reporting when it comes to programming with givens. This better error reporting, however, proved to be a trade-off. Sometimes it takes an unreasonable amount of time and space to compute a quality suggestion to the end user.
3720

0 commit comments

Comments
 (0)