guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Per-module reader, take #2


From: Neil Jerram
Subject: Re: [PATCH] Per-module reader, take #2
Date: Thu, 20 Oct 2005 23:09:43 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi Neil,
>
> Neil Jerram <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]