skip to main content
article

Binding as sets of scopes

Published:11 January 2016Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. Michael D. Adams. Towards the Essence of Hygiene. In Proc. Principles of Programming Languages, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alan Bawden and Jonathan Rees. Syntactic Closures. In Proc. Lisp and Functional Programming, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. William Clinger and Jonathan Rees. Macros that Work. In Proc. Principles of Programming Languages, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. William D. Clinger. Hygienic Macros Through Explicit Renaming. Lisp Pointers 4(4), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ryan Culpepper and Matthias Felleisen. Debugging Hygienic Macros. Science of Computer Programming 75(7), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Kent Dybvig, Robert Hieb, and Carl Bruggeman. Syntactic Abstraction in Scheme. Lisp and Symbolic Computation 5(4), 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Matthew Flatt. Compilable and Composable Macros, You Want it When? In Proc. International Conference on Functional Programming, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Matthew Flatt. Submodules in Racket: You Want it When, Again? In Proc. Generative Programming: Concepts and Experiences, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. David Herman. Dissertation. PhD dissertation, Northeastern University, 2008.Google ScholarGoogle Scholar
  12. Eugene Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic Macro Expansion. In Proc. Lisp and Functional Programming, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Eugene E. Kohlbecker and Mitchell Wand. Macro-by-Example: Deriving Syntactic Transformations from their Specifications. In Proc. Principles of Programming Languages, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Pierre Neron, Andrew P. Tolmach, Eelco Visser, and Guido Wachsmuth. A Theory of Name Resolution. In Proc. European Symposium on Programming, 2015.Google ScholarGoogle Scholar
  15. Frank Pfenning and Conal Elliott. Higher-order Abstract Syntax. In Proc. Programming Language Design and Implementation, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Andrew M. Pitts. Nominal Logic, a First Order Theory of Names and Binding. Information and Computation 186(2), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Andrew M. Pitts. Nominal Sets: Names and Symmetry in Computer Science. Cambridge University Press, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Paul Stansifer and Mitch Wand. Romeo: a System for More Flexible Binding-Safe Programming. In Proc. International Conference on Functional Programming, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Binding as sets of scopes

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      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
      • 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

      Copyright © 2016 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 January 2016

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!