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: Ludovic Courtès
Subject: Re: [PATCH] Per-module reader, take #2
Date: Thu, 20 Oct 2005 09:48:50 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi Neil,

Neil Jerram <address@hidden> writes:

> I don't think it should be connected with modules, though.  In my
> view:
>
> - modules should be about identifier access and visibility (including
>   issues such as possible separate compilation in future), and nothing
>   else  (and yes, this does imply that #:use-syntax was a mistake)

Right.

> - the appropriate unit of scope for your custom readers should be the
>   file, not the module; for two reasons in particular:

This makes sense, too.

>   - the file makes sense as a unit within which the coder would want
>     custom reading rules
>
>   - associating a reader with a file instead of with a module means
>     that your whole enhancement will work for code that is not
>     organized into a module, as well as for that which is!

Well, yes, this makes sense.

> What do you think?  If you agree, I think the implication is that two
> APIs (which can probably be straightforward procedures) would be
> useful:
>
> 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?

> 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.

Thanks for your comments!

Ludovic.




reply via email to

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