[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_* API extension? [was] scm_* API question
From: |
Christopher Cramer |
Subject: |
Re: scm_* API extension? [was] scm_* API question |
Date: |
Wed, 31 Jul 2002 15:06:02 -0500 |
User-agent: |
Mutt/1.2.5i |
On Wed, Jul 31, 2002 at 12:10:19PM +0200, Marius Vollmer wrote:
> address@hidden writes:
>
> > Would it be usefull to provide a scm_* function for it?
>
> Yes. I will add this to CVS.
>
> However, I'd say it is better to code all module system manipulations
> in Scheme and try to keep the C code 'module system ignorant' if that
> is possible.
>
> Why do you want to perform module system operations from C? Maybe
> there is a more elegant way.
I have no idea why you think it would better, but with certain types of
applications, it's impossible.
For sake of argument, let's say there are two different ways to use Guile.
One way is to extend Guile through C, by using load-extension. This works
fine if the C code is ignorant of the module system (writing a wrapper
module in Scheme handles everything). The other way is to extend C through
Guile, which cannot stay module system ignorant, because you typically
want to load multiple Scheme scripts without worrying about clashing
symbols from the different scripts -- this is currently impossible
without getting deep into the details of the module system.
I can provide examples of what I had to do with Recluse; roughly 300 lines
of C code are devoted to dealing with the module system.
--
Christopher Cramer <address@hidden> <http://www.pyro.net/~crayc/>
On résiste à l'invasion des armées; on ne résiste pas à l'invasion
des idées. -- Victor Hugo
Re: scm_* API question, Marius Vollmer, 2002/07/31