[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug with macros in SCM and Guile
From: |
Aubrey Jaffer |
Subject: |
Re: Bug with macros in SCM and Guile |
Date: |
Mon, 15 Jan 2007 21:26:07 -0500 (EST) |
| From: Kevin Ryde <address@hidden>
| Date: Tue, 16 Jan 2007 09:35:50 +1100
|
| Aubrey Jaffer <address@hidden> writes:
| >
| > | From: Marc Feeley <address@hidden>
| > | Date: Wed, 29 Nov 2006 15:58:57 -0500
| > |
| > | For SCM it seems that a macro call is normally expanded when
| > | an expression is encountered in a top-down traversal of the
| > | code, but not always. For example, in the function bar2 below
| > | the macro call to foo is expanded when bar2 is *called*, and
| > | at that point a new definition of the macro foo has been
| > | introduced.
|
| I thought that was the idea for defmacro, to expand when it runs,
| and in fact to re-expand every time it's run. A little wasteful,
| but it's emulating lisp style (or is it just emacs-lisp style) in
| that isn't it?
Looking at
http://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/mac_defmacro.html
I don't see where it requires repeated evaluation.