Hi Neil,

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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to