skip to main content
10.1145/2837614.2837620acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Binding as sets of scopes

Published: 11 January 2016 Publication History

Abstract

Our new macro expander for Racket builds on a novel approach to hygiene. Instead of basing macro expansion on variable renamings that are mediated by expansion history, our new expander tracks binding through a set of scopes that an identifier acquires from both binding forms and macro expansions. The resulting model of macro expansion is simpler and more uniform than one based on renaming, and it is sufficiently compatible with Racket's old expander to be practical.

Supplementary Material

Auxiliary Archive (p705-flatt-s.zip)
Complete and executable versions of the models presented in section 6.

References

[1]
Michael D. Adams. Towards the Essence of Hygiene. In Proc. Principles of Programming Languages, 2015.
[2]
Alan Bawden and Jonathan Rees. Syntactic Closures. In Proc. Lisp and Functional Programming, 1988.
[3]
William Clinger and Jonathan Rees. Macros that Work. In Proc. Principles of Programming Languages, 1991.
[4]
William D. Clinger. Hygienic Macros Through Explicit Renaming. Lisp Pointers 4(4), 1991.
[5]
Ryan Culpepper and Matthias Felleisen. Debugging Hygienic Macros. Science of Computer Programming 75(7), 2010.
[6]
Tim Disney et al. Sweet.js. 2015. http://sweetjs.org/ Tim Disney, Nathan Faubion, David Herman, and Cormac Flanagan. Sweeten your JavaScript: Hygienic Macros for ES5. In Proc. Symposium on Dynamic Languages, 2014.
[7]
R. Kent Dybvig, Robert Hieb, and Carl Bruggeman. Syntactic Abstraction in Scheme. Lisp and Symbolic Computation 5(4), 1993.
[8]
Matthew Flatt. Compilable and Composable Macros, You Want it When? In Proc. International Conference on Functional Programming, 2002.
[9]
Matthew Flatt. Submodules in Racket: You Want it When, Again? In Proc. Generative Programming: Concepts and Experiences, 2013.
[10]
Matthew Flatt, Ryan Culpepper, Robert Bruce Findler, and David Darais. Macros that Work Together: Compile-Time Bindings, Partial Expansion, and Definition Contexts. Journal of Functional Programming 22(2), 2012.
[11]
David Herman. Dissertation. PhD dissertation, Northeastern University, 2008.
[12]
Eugene Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic Macro Expansion. In Proc. Lisp and Functional Programming, 1986.
[13]
Eugene E. Kohlbecker and Mitchell Wand. Macro-by-Example: Deriving Syntactic Transformations from their Specifications. In Proc. Principles of Programming Languages, 1987.
[14]
Pierre Neron, Andrew P. Tolmach, Eelco Visser, and Guido Wachsmuth. A Theory of Name Resolution. In Proc. European Symposium on Programming, 2015.
[15]
Frank Pfenning and Conal Elliott. Higher-order Abstract Syntax. In Proc. Programming Language Design and Implementation, 1988.
[16]
Andrew M. Pitts. Nominal Logic, a First Order Theory of Names and Binding. Information and Computation 186(2), 2003.
[17]
Andrew M. Pitts. Nominal Sets: Names and Symmetry in Computer Science. Cambridge University Press, 2013.
[18]
Paul Stansifer and Mitch Wand. Romeo: a System for More Flexible Binding-Safe Programming. In Proc. International Conference on Functional Programming, 2014.

Cited By

View all
  • (2024)DSLs in Racket: You Want It How, Now?Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695645(84-103)Online publication date: 17-Oct-2024
  • (2024)Lightweight DSL for Describing Extensible Transition SystemsProceedings of the 39th ACM/SIGAPP Symposium on Applied Computing10.1145/3605098.3636025(1122-1131)Online publication date: 8-Apr-2024
  • (2023)Rhombus: A New Spin on Macros without All the ParenthesesProceedings of the ACM on Programming Languages10.1145/36228187:OOPSLA2(574-603)Online publication date: 16-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
January 2016
815 pages
ISBN:9781450335492
DOI:10.1145/2837614
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 51, Issue 1
    POPL '16
    January 2016
    815 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2914770
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Macros
  2. binding
  3. hygiene
  4. scope

Qualifiers

  • Research-article

Conference

POPL '16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)6
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)DSLs in Racket: You Want It How, Now?Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695645(84-103)Online publication date: 17-Oct-2024
  • (2024)Lightweight DSL for Describing Extensible Transition SystemsProceedings of the 39th ACM/SIGAPP Symposium on Applied Computing10.1145/3605098.3636025(1122-1131)Online publication date: 8-Apr-2024
  • (2023)Rhombus: A New Spin on Macros without All the ParenthesesProceedings of the ACM on Programming Languages10.1145/36228187:OOPSLA2(574-603)Online publication date: 16-Oct-2023
  • (2022)Composable Sequence Macros for Fast IterationProceedings of the 21st ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3564719.3568696(59-71)Online publication date: 29-Nov-2022
  • (2022)Karp: a language for NP reductionsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523732(762-776)Online publication date: 9-Jun-2022
  • (2022)Deep and shallow types for gradual languagesProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523430(580-593)Online publication date: 9-Jun-2022
  • (2021)Runtime and compiler support for HAMTsProceedings of the 17th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3486602.3486931(48-59)Online publication date: 19-Oct-2021
  • (2021)Filling typed holes with live GUIsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454059(511-525)Online publication date: 19-Jun-2021
  • (2020)Macros for domain-specific languagesProceedings of the ACM on Programming Languages10.1145/34282974:OOPSLA(1-29)Online publication date: 13-Nov-2020
  • (2020)Hygienic macro technologyProceedings of the ACM on Programming Languages10.1145/33863304:HOPL(1-110)Online publication date: 12-Jun-2020
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media