Since their introduction in 2.10, Macros have veritably taken Scala by storm. They pop up everywhere, often providing elegant syntax extensions for Scala libraries – note the prevalence of “sql” string interpolation macros, for example.
Many developers, however, are scared and confused by Macros – rightly so. Many examples of Macros require deep knowledge of the Scala AST, internals and oddities. But hope exists: newer features like quasiquotes make it ridiculously easy to write powerful Macros with code templating.
In this talk, we’ll demystify just how Macros work and are constructed, walking through many of the different “types” of Macros that Scala supports. A final focus will be given to the use of the newer Quasiquotes and Annotations features as a way of quickly constructing powerful new code features in your own Scala code.
Brendan McAdams works as a Senior Consultant & Trainer for Lightbend (formerly Typesafe), helping support and enable customers with the Reactive Platform (Scala, Akka, Play, Spark, and Lagom). In the past, Brendan has worked at Netflix building APIs, worked on a series of financial trading platforms, and was an early employee of MongoDB.
While at MongoDB, he created the integration drivers between MongoDB and Scala, as well as MongoDB and Hadoop. Brendan was also an early contributor to the Akka project, with one of the earliest Akka production deployments under his belt.
Do you want to sponsor flatMap(Oslo)?
Send an email to firstname.lastname@example.org