Home > Archive > Scheme > March 2007 > how to run library safely?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to run library safely?
|
|
| math.idiot@gmail.com 2007-03-22, 8:06 am |
| hi
I have a question:
how do I run other's people library safely?
for example if I use "load" to load a library file,
how do I confine the library so that it doesn't rewrite
some of my definition. (don't tell me I have to grep
through the file and do a intersection of both files.)
I mean as soon as I do a "load", some of my own code
will be be gone.... thanks
| |
| Emilio Lopes 2007-03-22, 7:06 pm |
| math idiot writes:
> how do I run other's people library safely?
> for example if I use "load" to load a library file,
> how do I confine the library so that it doesn't rewrite
> some of my definition. (don't tell me I have to grep
> through the file and do a intersection of both files.)
> I mean as soon as I do a "load", some of my own code
> will be be gone.... thanks
You load this library in its own module. Module are at this point no
standard in Scheme, but most "serious" Scheme implementations have
some kind of module system. Each module has a separate namespace, so
that identifier names do not collide. See the documentation of the
Scheme implementation you're using for details.
--
Emílio C. Lopes Ich leb und weiß nit wie lang,
Munich, Germany ich stirb und weiß nit wann,
ich fahr und weiß nit wohin,
(Martinus von Biberach) mich wundert, dass ich fröhlich bin!
|
|
|
|
|