guile-devel
[Top][All Lists]
Advanced

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

Re: Syntax checks


From: Lynn Winebarger
Subject: Re: Syntax checks
Date: Sat, 13 Apr 2002 13:10:58 -0500

On Saturday 13 April 2002 04:01, Dirk Herrmann wrote:
> I agree with you that re-compilation in case of a macro redefinition is of
> questionable worth.  Moreover, I don't see a demand for it:  Guile does
> not provide such a feature, and I can't remember that I ever saw a user
> requesting it on the list.

   In the discussion I was looking at (around December 2000, referenced in 
the module design notes),   Mikael Djurfeldt was arguing (if I understand 
him correctly) that object systems based on macros were inconvenient to
experiment with because changing core definitions didn't change the 
definitions that depended on them [in a course or lab he was teaching].  He
wanted changes in macros to be reflected in code that used them (including
reloading files/modules).
    Maybe there should be some way (for development purposes) to 
re-expand macros, but I don't believe it should be the default semantics 
- or even  that it should supported in normal use (i.e. without an evaluator
option being flipped on somewhere).  In particular, any compiler generated
code should not be required to support it without specially requesting that 
support.

> But, IMO the way guile currently does it is broken (IMO).  Look at the
> following example:
> [snipped - guile currently lazily evaluates macros with dynamic scoping]
>
> IMO, the current solution is broken.  Depending on the evaluation order
> and the actual execution paths that are taken, you can get completely
> different expansions, although the code is syntactically the same.  It is
> easy to create an example where it depends on _input data_ how the
> expansion will be done.  Ugh.

     Ahh, I had only seen that it expanded bar after re-definition, I didn't
realize it didn't consistently do that.  That seems worse to me (like the
worst of both worlds - all the variable capture problems of dynamic scope
with none of the hope of correcting them).

Lynn



reply via email to

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