[EMAIL PROTECTED] (Ludovic Courtès) writes:

> Hi Neil,
>
> Neil Jerram <[EMAIL PROTECTED]> 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

Reply via email to