Inverse Macro in Scala

Inverse Macro in Scala
复制标题

Scala 中的逆宏

DOI:
10.1145/2814204.2814213
复制
发表时间:
2016
期刊:
ACM SIGPLAN Notices - GPCE '15
影响因子:
--
通讯作者:
Hiroshi Yamaguchi and Shigeru Chiba
Hiroshi Yamaguchi and Shigeru Chiba
中科院分区:
--
文献类型:
--
作者:
H. Sasahara;M. Nagahara;K. Hayashi;and Y. Yamamoto;Hiroshi Yamaguchi and Shigeru Chiba

文献摘要

相似文献

我们提出了一种新的类型化句法宏系统--逆宏系统,它提高了宏系统的表达能力。逆宏系统能够实现具有复杂副作用的运算符,例如惰性运算符和定界连续运算符,这超出了现有宏系统的能力。我们已经实现了逆宏系统作为Scala 2.11的扩展。我们还通过比较两个版本的移位/复位,捆绑在Scala 2.11和实现的逆宏系统的表现力。
We propose a new variant of typed syntactic macro systems named inverse macro, which improves the expressiveness of macro systems. The inverse macro system enables to implement operators with complex side-effects, such as lazy operators and delimited continuation operators, which are beyond the power of existing macro systems. We have implemented the inverse macro system as an extension to Scala 2.11. We also show the expressiveness of the inverse macro system by comparing two versions of shift/reset, bundled in Scala 2.11 and implemented with the inverse macro system.