Composable and compilable macros -: You want it when?

被引:39
|
作者
Flatt, M [1 ]
机构
[1] Univ Utah, Salt Lake City, UT 84112 USA
关键词
languages; design; macros; modules; language tower;
D O I
10.1145/583852.581486
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Many macro systems, especially for Lisp and Scheme, allow macro transformers to perform general computation. Moreover, the language for implementing compile-time macro transformers is usually the same as the language for implementing run-time functions. As a side effect of this sharing, implementations tend to allow the mingling of compile-time values and rum-time values, as well as values from separate compilations. Such mingling breaks programming tools that must parse code without executing it. Macro implementors avoid harmful mingling by obeying certain macro-definition protocols and by inserting phase-distinguishing annotations into the code. However, the annotations are fragile, the protocols are not enforced, and programmers can only reason about the result in terms of the compiler's implementation. MzScheme-the language of the PLT Scheme tool suite-addresses the problem through a macro system that separates compilation without sacrificing the expressiveness of macros.
引用
收藏
页码:72 / 83
页数:12
相关论文
共 50 条
  • [1] MacoCaml: Staging Composable and Compilable Macros
    Xie, Ningning
    White, Leo
    Nicole, Olivier
    Yallop, Jeremy
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (ICFP):
  • [2] What you want, when you want it?
    Bosso, Christopher
    FEEDING CITIES: IMPROVING LOCAL FOOD ACCESS, SECURITY, AND RESILIENCE, 2017, : 1 - 8
  • [3] What you want when you want it
    Telephony, 1999, 236 (04):
  • [4] YOU WANT IT WHEN
    LUBEROFF, BJ
    CHEMTECH, 1989, 19 (03) : 129 - 129
  • [5] YOU WANT IT WHEN
    BRILL, JE
    ABA JOURNAL, 1992, 78 : 98 - 98
  • [6] You want it when?
    Ames, Benjamin B.
    Design News (Boston), 2000, 55 (04):
  • [7] You want it when?
    不详
    MICRO, 1996, 14 (05): : 14 - 14
  • [8] You want it when?
    不详
    MANUFACTURING ENGINEERING, 1999, 123 (02): : 140 - +
  • [9] Composable Sequence Macros for Fast Iteration
    Bolotina, Anna
    Culpepper, Ryan
    PROCEEDINGS OF THE 21ST ACM SIGPLAN INTERNATIONAL CONFERENCE ON GENERATIVE PROGRAMMING: CONCEPTS AND EXPERIENCES, GPCE 2022, 2022, : 59 - 71
  • [10] GitLab: work where you want, when you want
    Prithwiraj Choudhury
    Kevin Crowston
    Linus Dahlander
    Marco S. Minervini
    Sumita Raghuram
    Journal of Organization Design, 9