[r6rs-discuss] R6 counterproposal

From: Aubrey Jaffer <agj>
Date: Sun, 27 May 2007 12:02:34 -0400 (EDT)

 | Date: Sat, 26 May 2007 11:58:47 -0700
 | From: "Joe Marshall" <jmarshall at alum.mit.edu>
 |
 | On 5/25/07, Thomas Lord <lord at emf.net> wrote:
 | > There's nothing especially new about the proposals.
 |
 | Nope. And that's part of the problem.
 |
 | Both FEXPRs and first-class environments make it extremely
 | difficult to reason about the behavior of a program. With FEXPRs,
 | you simply cannot tell whether any particular instance of a
 | function call is going to be a special form or not. It might be
 | applicative order this time, normal order next time. Every year or
 | two someone tries to re-introduce fexprs. People point out the
 | problems and the person ignores them and tries anyway. He comes
 | back a month or so later and says ``Well, I got them working, but I
 | can't figure out how to compile...''

SCM has been using FEXPRs without the difficulties you mention since
1992. In interpretation, each FEXPR form is replaced by the code it
expands to the first time that form is evaluated.

Both the Hobbit (http://swiss.csail.mit.edu/~jaffer/hobbit_toc.html)
and Schlep (http://swissnet.ai.mit.edu/~jaffer/Docupage/schlep.html)
compilers expand all defmacros before analyzing the code to be
compiled using the SLIB function DEFMACRO:EXPAND*

  `(require 'defmacroexpand)'

   -- Function: defmacro:expand* e
       Returns the result of expanding all defmacros in scheme
       expression E.

SLIB also has expander functions for the Macros-That-Work,
Syntactic-Closures, and Syntax-Case macro systems.
Received on Sun May 27 2007 - 12:02:34 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC