From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Per-module reader, take #2 Date: Fri, 21 Oct 2005 09:43:17 +0200 Organization: LAAS-CNRS Message-ID: <87br1jiacq.fsf@laas.fr> References: <87u0gp9lm3.fsf@laas.fr> <877jd3lkdq.fsf@ossau.uklinux.net> <87hdc62a6c.fsf@laas.fr> <87irw49twc.fsf@laas.fr> <87irw3prgp.fsf@ossau.uklinux.net> <8764rw7b9q.fsf_-_@laas.fr> <871x2j98qb.fsf@ossau.uklinux.net> <87u0ffnudk.fsf@laas.fr> <87sluxb0xt.fsf@ossau.uklinux.net> <87r7agvdb1.fsf@laas.fr> <87wtk796xk.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129891077 26136 80.91.229.2 (21 Oct 2005 10:37:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2005 10:37:57 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Oct 21 12:37:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESuFl-0004vl-9S for guile-devel@m.gmane.org; Fri, 21 Oct 2005 12:36:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EStzd-0005MI-LX for guile-devel@m.gmane.org; Fri, 21 Oct 2005 06:19:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESrcW-0002KW-U9 for guile-devel@gnu.org; Fri, 21 Oct 2005 03:47:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESrcS-0002K8-JL for guile-devel@gnu.org; Fri, 21 Oct 2005 03:47:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESrcQ-0002Jy-B8 for guile-devel@gnu.org; Fri, 21 Oct 2005 03:47:15 -0400 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ESrcP-0005Sq-9X for guile-devel@gnu.org; Fri, 21 Oct 2005 03:47:13 -0400 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id j9L7l7DK006881; Fri, 21 Oct 2005 09:47:08 +0200 (CEST) Original-To: Neil Jerram X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 30 =?iso-8859-1?Q?Vend=E9miaire?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Neil Jerram , guile-devel@gnu.org In-Reply-To: <87wtk796xk.fsf@ossau.uklinux.net> (Neil Jerram's message of "Thu, 20 Oct 2005 23:09:43 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5337 Archived-At: Hi, Neil Jerram writes: > Yes, indeed. Just one detail: I suspect that > > scm_frame_fluid(the_reader, SCM_BOOL_F); > > might be less surprising than > > scm_frame_fluid(the_reader, CURRENT_READER()); > > at the start of primitive-load. Given how Guile works already, I > think it's more natural for files to be independent of each other, > reader-wise, and that we add something new that people can use to get > reader inheritance when they want that. Right. I did hesitate between the two solutions in fact. I was thinking that one might want to purposefully call `set-current-reader' just before invoking `primitive-load'. But in fact, for that purpose, we'd better provide a `load-with-reader' procedure as you said. And it is true that having `current-reader' default to `#f' would keep away users from experiencing weird unexpected behavior. > (`include' feels like a nice name to me. It could be implemented > using an optional reader arg to load/primitive-load, something like: > > (include FILE) -> (load FILE (current-reader)) Maybe `load-with-reader' is more explicit, while not as nice? ;-) > And then primitive-load would call scm_frame_fluid with the optional > arg if supplied, SCM_BOOL_F otherwise.) In fact, in order to retain binary compatibility, we'd have to provide another function which would essentially contain the same code as `primitive-load' except for the optional reader argument and the default value of the `current-reader' fluid. I'll try to have an attempt at implementing it today. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel