Macros that Work Together
Summary: The author starts out by introducing issues of lexical binding in macro expansion, showing that scope is respected in the current macro system of Scheme. He then talks about syntax objects and how racket can use them in conjunction with macros in order to extend the language by sharing compile-time information. The author talks about define syntax and how that can be used in conjunction with syntax-local-value in order to grab the value of bound to the identifier of a member of a struct. The author also talks about how multiple functions are declared in a syntax-declaration (such as accessors on fields). The author also talks about how class declarations are handled in racket and the specifics of what mechanisms are used to process that declaration. The author then talks about internal definitions and how they’re handled. The author then briefly discusses packages in racket. The author then talks about how the debug tool in racket works using syntax objects in order to capture intermediate information about the program instead of fully expanding it. The author then briefly shows the core racket language. The author then outlines the different part of the racket syntax objects and also explains the differences in variable evalutaiton between racket and Lisp. The author then talks about how readers construct syntax objects and how different parts of the syntax object are evaluated. The author defines what some of the expressions he uses are in Lisp, then he talks about how one his model is simpler than the one in Racket or Scheme. The author then outlines the basic parsing algorithm and gives a simple example of the expansion of an expression into a syntax object as well as a basic parsing algorithm using operation he defined. The author then talks about how parse will deal with lexical context information. The next part talks about the expander and how it renames things as it performs the expansion to preserve lexical scope. The author then introduces a simple macro definition and explains how it will be handled. The author then talks about how to expand the simple macro definition to include lexical context and how that is handled by the expander. The author then adds in some machinery so macros can be used more like racket ones, lexpand and lvalue. The author then introduces def-bind and new-defs for making definition contexts and shows examples of how they are used. The author then discusses related work.
Major Contributions: This paper discusses the macro system of racket and more specifically shows how it allows for macros to share information between each other instead of just respecting lexical scope like in a scheme macro.
Something I learned: I learned that racket uses syntax objects for representing macros in order to handle intermediate representations as well as allowing macros to look inside each other.