Rhombus: A New Spin on Macros without All the Parentheses

Author:

Flatt Matthew1ORCID,Allred Taylor1ORCID,Angle Nia2ORCID,De Gabrielle Stephen3ORCID,Findler Robert Bruce4ORCID,Firth Jack5ORCID,Gopinathan Kiran6ORCID,Greenman Ben7ORCID,Kasivajhula Siddhartha8ORCID,Knauth Alex9ORCID,McCarthy Jay10ORCID,Phillips Sam8ORCID,Porncharoenwase Sorawee11ORCID,Søgaard Jens Axel12ORCID,Tobin-Hochstadt Sam13ORCID

Affiliation:

1. University of Utah, Salt Lake City, USA

2. n.n., Concord, United States

3. n.n., London, United Kingdom

4. Northwestern University, Evanston, USA

5. n.n., Sunnyvale, United States

6. National University of Singapore, Singapore, Singapore

7. Brown University, Providence, USA

8. n.n., Oakland, United States

9. n.n., Williamsport, United States

10. Reach, Provo, USA

11. University of Washington, Seattle, USA

12. n.n., Skjern, Denmark

13. Indiana University, Bloomington, USA

Abstract

Rhombus is a new language that is built on Racket. It offers the same kind of language extensibility as Racket itself, but using traditional (infix) notation. Although Rhombus is far from the first language to support Lisp-style macros without Lisp-style parentheses, Rhombus offers a novel synthesis of macro technology that is practical and expressive. A key element is the use of multiple binding spaces for context-specific sublanguages. For example, expressions and pattern-matching forms can use the same operators with different meanings and without creating conflicts. Context-sensitive bindings, in turn, facilitate a language design that reduces the notational distance between the core language and macro facilities. For example, repetitions can be defined and used in binding and expression contexts generally, which enables a smoother transition from programming to metaprogramming. Finally, since handling static information (such as types) is also a necessary part of growing macros beyond Lisp, Rhombus includes support in its expansion protocol for communicating static information among bindings and expressions. The Rhombus implementation demonstrates that all of these pieces can work together in a coherent and user-friendly language.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference70 articles.

1. Annika Aasa , Kent Petersson , and Dan Synek. Concrete Syntax for Data Objects in Functional Languages. In Proc. Lisp and Functional Programming , 1988 . doi: 10.1145/62678.62688 10.1145/62678.62688 Annika Aasa, Kent Petersson, and Dan Synek. Concrete Syntax for Data Objects in Functional Languages. In Proc. Lisp and Functional Programming, 1988. doi: 10.1145/62678.62688

2. Michael D. Adams. Towards the Essence of Hygiene. In Proc. Principles of Programming Languages , 2015 . doi: 10.1145/2775051.2677013 10.1145/2775051.2677013 Michael D. Adams. Towards the Essence of Hygiene. In Proc. Principles of Programming Languages, 2015. doi: 10.1145/2775051.2677013

3. Eric Allen , Ryan Culpepper , Janus Dam Nielsen , Jon Rafkind , and Sukyoung Ryu . Growing a Syntax . In Proc. Foundations of Object-Oriented Languages , 2009 . Eric Allen, Ryan Culpepper, Janus Dam Nielsen, Jon Rafkind, and Sukyoung Ryu. Growing a Syntax. In Proc. Foundations of Object-Oriented Languages, 2009.

4. Nia Angle. Parendown. 2017. https://github.com/lathe/parendown-for-racket Nia Angle. Parendown. 2017. https://github.com/lathe/parendown-for-racket

5. Arne Babenhauserheide . SRFI-119 : Wisp: Simpler Indentation-Sensitive Scheme . 2015 . https://srfi.schemers.org/srfi-119/srfi119.html Arne Babenhauserheide. SRFI-119 : Wisp: Simpler Indentation-Sensitive Scheme. 2015. https://srfi.schemers.org/srfi-119/srfi119.html

Cited by 1 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Compiled, Extensible, Multi-language DSLs (Functional Pearl);Proceedings of the ACM on Programming Languages;2024-08-15

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3