From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Per-module reader, take #2 Date: Thu, 20 Oct 2005 23:09:43 +0100 Message-ID: <87wtk796xk.fsf@ossau.uklinux.net> 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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1129846341 5541 80.91.229.2 (20 Oct 2005 22:12:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2005 22:12:21 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Oct 21 00:12:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESibk-0007Jl-2Y for guile-devel@m.gmane.org; Fri, 21 Oct 2005 00:09:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESibj-0001SK-E1 for guile-devel@m.gmane.org; Thu, 20 Oct 2005 18:09:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESibg-0001SE-Fn for guile-devel@gnu.org; Thu, 20 Oct 2005 18:09:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESibe-0001S1-VS for guile-devel@gnu.org; Thu, 20 Oct 2005 18:09:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESibe-0001Ry-RA for guile-devel@gnu.org; Thu, 20 Oct 2005 18:09:50 -0400 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ESibe-0001WJ-Nv for guile-devel@gnu.org; Thu, 20 Oct 2005 18:09:50 -0400 Original-Received: from laruns (host81-130-181-102.in-addr.btopenworld.com [81.130.181.102]) by mail3.uklinux.net (Postfix) with ESMTP id 0AE0B409FB4 for ; Thu, 20 Oct 2005 22:09:50 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id F25B06F6CE for ; Thu, 20 Oct 2005 23:09:43 +0100 (BST) Original-To: guile-devel@gnu.org In-Reply-To: <87r7agvdb1.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Thu, 20 Oct 2005 09:48:50 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) 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:5336 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > Hi Neil, > > Neil Jerram writes: > >> 1. A way to say "change the reader to XXX for the rest of this file". > > I believe `set-current-reader' (introduced in the second patch) can do > this job pretty well. What do you think? 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. (`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)) And then primitive-load would call scm_frame_fluid with the optional arg if supplied, SCM_BOOL_F otherwise.) >> 2. A way to say "load FILE using reader XXX". > > This is not really an issue since one can always write their own > `load-with-reader' procedure. Of course, we could also provide one with > Guile (like `primitive-load-with-reader') taking a reader as a second > argument. Yes. I think this _is_ worth doing, for the same reasons as in my followup to Kevin's email. Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel