Day 3 -

Sept 14th

Stage 2 (Demo 3)

11:15 - 12:00

Implementing a Macro

In this talk, we will walk through the implementation of a macro, exploring the metaprogramming API and how to use it. It will cover inline macros, the use of quotes to construct and pattern-match on expressions, and the use of reflection to enhance the expressiveness of the macro.

The code we will explore will contain string interpolator macros to construct and deconstruct a JSON object representation. The macro will leverage the Selectable trait in combination with refinement types to encode the object schema.

Nicolas Stucki


Core contributor to Scala 3 language design and implementation. Designed and implemented the Scala 3 metaprogramming framework.


Join our conference

Subscribe and follow @ScalaDays on Twitter for the latest conference updates.