guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Per-module reader


From: Ludovic Courtès
Subject: Re: [PATCH] Per-module reader
Date: Tue, 27 Sep 2005 11:04:04 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

Kevin Ryde <address@hidden> writes:

> I have doubts.  Can you give more examples of when it might be used?
> Elisp syntax is probably not a good example, since elisp code wouldn't
> start with "define-module".

There are really two questions in your message.  One is "do we really
need syntax configuration beyond #,() and the likes?".  The second one
is "why would we write Guile modules that use a potentially
significantly different syntax?"  The per-module mechanisms is
addressing the latter.  My answer to the former is "yes" and
`guile-reader' is trying to address this.

The point is the following: one may wish to write a Guile module using
her own syntax variant (no matter which one), yet want it to be well
integrated into Guile's module hierarchy, correctly read, and not have
unexpected side effects on the user's code.

IMO, per-module readers are a way to fix the current scheme were there's
only one instance of `read' and any module can happily modify it via
`read-enable' and the likes.  Ultimately, I'd be very glad if
`read-enable', for instance, could translate into something like

  (%read-enable (module-reader (current-module)) something)

In the end, `define-module' could almost be thought of as the Guile
equivalent to the `#!' sequence found at the beginning of Unix scripts.

As for syntax variants, my main interest currently is the syntax of
Skribe[1] which borrows from Scheme, DSSSL, and also has special forms
using square brackets.  But again, that is a question relevant to
`guile-reader' more than to the per-module reader mechanism.

Thanks,
Ludovic.

[1] http://www-sop.inria.fr/mimosa/fp/Skribe/




reply via email to

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