Inverse Macro in Scala
Inverse Macro in Scala
复制标题
Scala 中的逆宏
DOI:
10.1145/2814204.2814213
复制
发表时间:
2016
期刊:
影响因子:
--
通讯作者:
Hiroshi Yamaguchi and Shigeru Chiba
中科院分区:
文献类型:
--
作者:
H. Sasahara;M. Nagahara;K. Hayashi;and Y. Yamamoto;Hiroshi Yamaguchi and Shigeru Chiba
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.