[plt-scheme] Module questions/clarifications

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Jan 18 14:44:00 EST 2007

On Jan 18, Jay Kint wrote:
> I am trying to replicate CL's feature expressions.  The reader
> macros and selective expansion are fairly easy, but it's the access
> to the *features* variable that's eluding me.  If I define
> everything at a global level, then it works fine, but I'd like to be
> able to use them within modules as well, and that I'm having a
> problem with.

You can create a binding that is actually a syntax, so that you can
use it as an expression as well as `set!' it (which will really invoke
a function that changes the value).

But my guess is that you want to use it on both the syntactic level
and run-time.  This will not work -- the syntax system is explicitly
trying its best to avoid this sharing, and you will still end up with
two different values.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.