Rhombus: A New Spin on Macros without All the Parentheses
Matthew Flatt, Taylor Allred, Nia Angle, Stephen De Gabrielle, Robert Bruce Findler, Jack Firth, Kiran Gopinathan, Ben Greenman, Siddhartha Kasivajhula, Alex Knauth, Jay A. McCarthy, Sam Phillips
Abstract
Rhombus is a new language that is built on Racket. It offers the same kind of language extensibility as Racket itself, but using conventional (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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f3f8a394-b55e-48ca-9560-78146ac0a29aCited by top-tier papers1
Ask how each one uses itBuilds on1
Related papers
- Compiler and runtime support for continuation marksMatthew Flatt, R. Kent DybvigPLDI 2020 · 9 citations
- A Pretty Expressive PrinterSorawee Porncharoenwase, Justin Pombrio, Emina TorlakOOPSLA 2023
- Roulette: A Language for Expressive, Exact, and Efficient Discrete Probabilistic ProgrammingCameron Moy, Jack Czenszak, John M. Li, Brianna Marshall et al.PLDI 2025 · 3 citations
- Programming Network Stack for Middleboxes with RubikHao Li, Changhao Wu, Guangda Sun, Peng Zhang et al.NSDI 2021 · 14 citations
- Efficient module-level dynamic analysis for dynamic languages with module recontextualizationNikos Vasilakis, Grigoris Ntousakis, Veit Heller, Martin C. RinardFSE 2021 · 6 citations
