| Date: Sat, 26 May 2007 11:58:47 -0700
 | From: "Joe Marshall" <[EMAIL PROTECTED]>
 | 
 | On 5/25/07, Thomas Lord <[EMAIL PROTECTED]> 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.

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to