1 / 10
文档名称:

Scala Macros Let Our bine!:Scala宏让我们的力量结合起来!.pdf

格式:pdf   页数:10页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Scala Macros Let Our bine!:Scala宏让我们的力量结合起来!.pdf

上传人:薄荷牛奶 2016/4/15 文件大小:0 KB

下载得到文件列表

Scala Macros Let Our bine!:Scala宏让我们的力量结合起来!.pdf

相关文档

文档介绍

文档介绍: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