~/talk

Philosophy of Scala macros

Talkat Strange Loop 2013 · 2013-09-18..09-20· [compilers-and-language-design, scala]
slides:none on file

Explains that def macros in Scala 2.10 actually expand method calls at compile time, powering concrete features like async/await, the f string interpolator and automatic pickler generation via implicits; shows that a separate repo macro paradise compiler plugin prototypes untyped/type macros and macro annotations, how the Scala typechecker blocks some expansions, and how blackbox macros preserve signatures while whitebox macros can generate visible definitions (enumeration example) and provoke semantic surprises.

AI-written summary · about

  1. 0:00Intro
  2. 1:06Inception
  3. 4:39Related language features
  4. 7:09Towards macros in Scala 2.10
  5. 8:41Macros as implemented in 2.10
  6. 11:23On the verge of the release
  7. 11:56Adoption
  8. 12:49Recognition
  9. 13:25The main question of today's talk
  10. 13:48Features represented with method calls
  11. 14:18Our experience
  12. 14:52Empowered method calls
  13. 16:42Empowered interpolation
  14. 20:07Empowered implicits
  15. 22:06Example #3 - Before macros
  16. 22:45Example #3 - Vanilla macros
  17. 23:47Example #3 - Implicit macros
  18. 25:32Implicits and macros: a match made in heaven
  19. 26:19Implicits and macros: a retrospective
  20. 27:02Summary
  21. 27:50Limitations of def macros
  22. 28:25Limitation #2 - Can't affect global bindings
  23. 29:20Macro paradise
  24. 30:07Untyped macros
  25. 30:33Type macros
  26. 31:04Macro annotations
  27. 31:59Two faces of Scala macros
  28. 32:48The phenomenon of whitebox macros
  29. 33:35Explanation #1 - Scala is not very whitebox
  30. 34:18Explanation #2 - Whitebox is not very Scala
  31. 37:36The bottom line
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.