文档介绍:Scala Macros: Let Our bine! On How Rich Syntax and Static Types Work with Metaprogramming Eugene Burmako EPFL, Switzerland ????????????????????? pile-time metaprogramming has been proven immensely useful enabling programming techniques such as language virtualization, embedding of external DSLs,self-optimization, and boilerplate generation amongst many others. In the recent production release of Scala we have introduced macros, an experimental facility which gives its pile-time metaprogramming powers. Alongside of the mainline release of Scala Macros, we have also intro- duced other macro flavors, which provide their users with different interfaces and capabilities for interacting with the piler. In this paper, we show how the rich syntax and static types of Scala synergize with macros, through a number of real case studies using our macros (some of which are production systems) such as language virtualization, type providers, materialization of type class instances, type-level programming, and embedding of external DSLs. We explore how macros enable new and unique ways to use pre-existing language features such as implicits, dynamics, annotations, string interpolation and others, showing along the way how these synergies open up new ways of dealing with software development challenges. 1. pile-time metaprogramming can be thought of as the al- gorithmic construction of pr