Do You Even Macro?
summary
Explains how Scala 3 macros actually work: macros are written as inline methods that quote code, run a transformation, then splice results back; require import scala.quoted. and a given Quotes context and must live in a separate file. Shows extracting compile‑time constants (40 + 2), using valueOrAbort for errors, pattern‑matching and deconstructing expressions and types (options, chained list maps), and even synthesizing types or reading schemas at compile time — demos compile and produce the transformed code or a descriptive compile error.
AI-written summary · about
chapters (7)
- 0:00Scala 3 macros intro
- 4:36Metaprogramming and ASTs
- 8:08Macro phases in Scala 3
- 11:17First macro demo
- 16:15Pattern matching in macros
- 21:19Advanced macro use cases
- 26:41Q&A








