From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Christopher Cramer Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_* API extension? [was] scm_* API question Date: Wed, 31 Jul 2002 15:06:02 -0500 Sender: guile-devel-admin@gnu.org Message-ID: <20020731150602.A32555@kiwi.pyrotechnics.com> References: <20020730121436.GA4465@www> <20020730200929.A18106@kiwi.pyrotechnics.com> <20020731100300.GC5661@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1028145759 26059 127.0.0.1 (31 Jul 2002 20:02:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 20:02:39 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Zzg6-0006mC-00 for ; Wed, 31 Jul 2002 22:02:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17ZzgY-0006sx-00; Wed, 31 Jul 2002 16:03:06 -0400 Original-Received: from pyro.net ([207.7.10.6] helo=kiwi.pyro.net) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17Zzfg-0006lw-00 for ; Wed, 31 Jul 2002 16:02:12 -0400 Original-Received: (qmail 2892 invoked by uid 8610); 31 Jul 2002 20:06:03 -0000 Original-To: Marius Vollmer Mail-Followup-To: Marius Vollmer , guile-devel@gnu.org Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from marius.vollmer@uni-dortmund.de on Wed, Jul 31, 2002 at 12:10:19PM +0200 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:903 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:903 On Wed, Jul 31, 2002 at 12:10:19PM +0200, Marius Vollmer wrote: > rm@fabula.de 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 On résiste à l'invasion des armées; on ne résiste pas à l'invasion des idées. -- Victor Hugo _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel