From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cedric Cellier Newsgroups: gmane.lisp.guile.user Subject: Re: Best way to call a user defined hook (written in guile) from C when the hook need plenty parameters Date: Tue, 6 Jul 2010 13:22:50 +0200 Message-ID: <20100706112250.GB2877@securactive.net> References: <20100705085635.GB9492@apc> <87bpalof6x.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278415394 15975 80.91.229.12 (6 Jul 2010 11:23:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 11:23:14 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jul 06 13:23:13 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OW6F5-00086h-5B for guile-user@m.gmane.org; Tue, 06 Jul 2010 13:23:11 +0200 Original-Received: from localhost ([127.0.0.1]:41756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW6F4-00015X-L0 for guile-user@m.gmane.org; Tue, 06 Jul 2010 07:23:10 -0400 Original-Received: from [140.186.70.92] (port=45018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW6Ep-00015S-Nn for guile-user@gnu.org; Tue, 06 Jul 2010 07:22:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OW6Eo-0004Ia-Mo for guile-user@gnu.org; Tue, 06 Jul 2010 07:22:55 -0400 Original-Received: from smtp5-g21.free.fr ([212.27.42.5]:39009) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW6Eo-0004ID-4V for guile-user@gnu.org; Tue, 06 Jul 2010 07:22:54 -0400 Original-Received: from apc.happyleptic.org (unknown [82.67.194.89]) by smtp5-g21.free.fr (Postfix) with ESMTP id F0F06D4807B for ; Tue, 6 Jul 2010 13:22:48 +0200 (CEST) Original-Received: from ccellier.rd.securactive.lan (extranet.securactive.org [82.234.213.170]) by apc.happyleptic.org (Postfix) with ESMTP id C0BE23347D for ; Tue, 6 Jul 2010 13:22:51 +0200 (CEST) Original-Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.71) (envelope-from ) id 1OW6Ek-0001Lj-Pc for guile-user@gnu.org; Tue, 06 Jul 2010 13:22:50 +0200 Content-Disposition: inline In-Reply-To: <87bpalof6x.fsf@ossau.uklinux.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7965 Archived-At: -[ Mon, Jul 05, 2010 at 09:18:30PM +0100, Neil Jerram ]---- > But you could get a similar effect - which I think will still work in > 1.9/2.0 - by creating a module, defining values in it, and then > evaluating in that module. (In Guile, module == top level > environment.) I was trying to avoid binding values to variables because I believe it would be too slow. I think, having performed no measurment, that passing the values as function parameters is much faster than manualy binding these values to an environment. But maybe I'm wrong, and function parameters are actualy implemented in a way similar to an alist ?