Evolution of Scala macros at Strange Loop 2013

Eugene Burmako

Let’s take a journey to the internals of Scala macros!

We will start off in the early days of macros in Scala and the initial design of def macros, which ended up in the production release of Scala 2.10. We will also take a look at the popular use cases and patterns characteristic for our macro system.

Afterwards we are going to learn about macro paradise, a spawning pool for the new ideas, and get acquainted with its inhabitants: type macros, untyped macros, inference macros, jitted macros and macro annotations. Then, in the next act our new friends will try to make it into Scala 2.11, only to be stopped by the keepers of the Scala typechecker.

The narration will culminate when in addition to discovering a threat coming from the new macros, we find out that Scala 2.10 is already infiltrated. After the two forces collide, the next generation of macros in born, having two faces: blackbox macros and whitebox macros.

The next generation of macros brings peace to the macroland, and happiness ensues. But in the meanwhile, far away in macro paradise, macro annotations are getting mature, planning to try their luck in 2.12…

Strange Loop 2013 session page: https://thestrangeloop.com/sessions/evolution-of-scala-macros
Download the slides: Evolution of Scala Macros (PDF, 74 Kb)