[plt-scheme] dynamic-*un*-require?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Oct 25 09:20:15 EDT 2008

On Sat, Oct 25, 2008 at 6:43 AM, YC <yinso.chen at gmail.com> wrote:
>
>
> On Fri, Oct 24, 2008 at 6:04 PM, Robby Findler <robby at cs.uchicago.edu>
> wrote:
>>
>> There used to be something where if you were to evaluate the code for
>> the module it would be instantiated right away in the namespace where
>> it was previously. I don't know if that still works. But anyways, that
>> seems hard to use effectively. A better approach is probably to create
>> a new namespace (possibly one that shares some modules with another
>> namespace if that is safe) and just reload the module there.
>>
> Thanks for the tip Robby - a couple of follow up questions
>
> 1.  how do I use code from another namespace within the current namespace?
> I can think of parameterizing current-namespace, but that means I would have
> to remember which function belongs in which namespace...

Instead of by function, you'd do it by module. You can use
namespace-attach-module to bring a module over from one namespace to
another.

> 2. does the namespace (and the loaded module) gets garbage collected
> automatically if I delete the reference to them?

Yes.

Robby

> Thanks,
> yc
>
>


Posted on the users mailing list.