[plt-scheme] Module questions/clarifications

From: Jay Kint (lists at hobbit-hole.org)
Date: Thu Jan 18 14:39:16 EST 2007

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.

If I define a "features-expressions.ss" module and require it in
different modules, each module gets its own *features* variable
apparently.  I'm looking for a way to define a global variable
*features* that allows changes in one module to be visible to other

Something like CL's package system would work great.  Is there
something like this?  I've looked at units, but they don't seem to be
able to do this.

Is there some other way to do this that I'm not aware of?

Many thanks to the ideas so far.  I feel like I'm close, but not quite there.


Posted on the users mailing list.