guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange memoizing behavior


From: Marius Vollmer
Subject: Re: Strange memoizing behavior
Date: 24 Jan 2002 21:58:05 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Michael Livshin <address@hidden> writes:

> I think that wanting to be more dynamic than Common Lisp is a Silly
> Idea, overall, but as I said I probably don't see all the usefullness
> of this eval-free macro introspection, so I'll be very grateful if you
> ignore my snottiness and elaborate further.

We can have it both, fixing the bug and keeping the introspection
abilities.

We currently have a setup like this:

    symbol -> variable -> value

During memoization, when an expression in the operator position of a
form evaluates to a value that is a macro transformer, that macro is
expanded.

What we need to do is to have something like this

              -> variable -> value
     symbol -|
              -> macro-transformer

That is, when looking up a symbol, we might find a variable OR a macro
transformer.  You would not be able to bind a symbol to a
macro-transformer with 'define', we would need a new form, for example
'define-syntax'.

For global bindings, this is straightforward to implement, since
global bindings use 'variable objects' that have their own type and
can be readily identified.  For local environments, something similar
can likely be arranged.

Of course, this all needs to be properly integrated with syntax-case.

[ I also think that SCM has recently solved the original problem with
  some smallish, elegant change, but I can't remember what it was... ]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]