[plt-scheme] How to deal with namespace in embed mode?

From: Chiyuan Zhang (pluskid at gmail.com)
Date: Sun Jun 1 00:28:12 EDT 2008

Hi all,

I sent a mail to the list but it seems that non-member can't do this.
So I subscribed to this list and ask again.

I was embedding mzscheme and I sometimes need multiple independent
namespaces. The document on namespace of "Inside PLT MzScheme" is
rather brief. But I found that it seems "make_namespace" can be used
to create a Scheme_Env * which can be used as a namespace.

It can be passed to the functions like scheme_eval as the namespace to
use. However, I found another paragraph in "PLT MzScheme: Language

  A namespace is used by setting the current-namespace parameter value
  (see section, by providing the namespace to procedures such
  as eval and eval-syntax.

So is it enough by just passing the namespace to the functions? Or
should I set the current-namespace parameter each time I switched to
another namespace?

Thanks for help!


Posted on the users mailing list.