unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] Per-module reader, take #3
Date: Sat, 03 Dec 2005 20:02:32 +0000	[thread overview]
Message-ID: <8764q6kkyv.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87acg0maxs.fsf@zagadka.de> (Marius Vollmer's message of "20 Nov 2005 02:15:27 +0200")

Marius Vollmer <mvo@zagadka.de> writes:

> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> To be completely concrete about what I mean, here is a version of
>> your patch which I prefer (untested except by make check).
>
> Hmm.  Your approach make 'load' configurable so that it can use
> different 'read' procedures.  Wouldn't it be more natural to make
> 'read' configurable to parse different syntaxes?
>
> 'load' is only a thin wrapper around 'read' and 'eval' (basically, a
> repl without the 'p').  The real meat is in 'read' (syntax) and 'eval'
> (semantics).  So, if we want to customize the syntax, I'd say 'read'
> is the place to do it.  Then all users of 'read' would automatically
> use the new syntax, not only when reading code in 'load'.  (That's one
> big point of Lisp, that the data and code syntax are the same.)

That was my one of my first thoughts also (see towards the end of
http://lists.gnu.org/archive/html/guile-devel/2005-09/msg00035.html).
But now I'm not sure that it makes sense.  If you are reading
expressions by hand, and you want to use an alternative reader to do
so, you can just call (alternative-read port) - there's no need to
make the normal `read' configurable.

On the other hand, the reason for allowing `load' to be configurable
(with an alternative reader) is pretty much exactly the same as the
reason why we think it's useful to provide `load' at all: that is,
just that it's too boring to ask developers to write the same read
eval loop over and over again, even though they could.

Finally, although we might in theory be able to accommodate all
possible reading variants as configurable options to the default read,
in practice (i) this would be a pain for anyone wanting a variant that
hasn't yet been incorporated into Guile's official reader, because
they'd have to argue for it and then wait until it filtered through to
a release, and (ii) we'd still need to implement something to make it
easy to confine the effect/scope of read options to particular files,
because the common case is that particular files require particular
read variants.  Taking (i) and (ii), it seems a lot simpler just to
allow the Guile developer to specify an alternative read procedure for
a particular load operation.

> However, making the read procedure used by 'load' configurable can't
> hurt, I think.

OK, thanks.  I'll just wait a few days in case you or anyone else have
further comments.  If not I'll commit the patch as proposed.

Regards,
        Neil



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


  parent reply	other threads:[~2005-12-03 20:02 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 12:51 [PATCH] Per-module reader Ludovic Courtès
2005-09-26 12:29 ` Ludovic Courtès
2005-09-26 22:55   ` Kevin Ryde
2005-09-27  9:04     ` Ludovic Courtès
2005-09-26 19:05 ` Neil Jerram
2005-09-27  8:21   ` Ludovic Courtès
2005-10-11 11:26     ` Ludovic Courtès
2005-10-11 23:24       ` Neil Jerram
2005-10-12  9:11         ` Ludovic Courtès
2005-10-17  9:17         ` [PATCH] Per-module reader, take #2 Ludovic Courtès
2005-10-17 20:41           ` Neil Jerram
2005-10-18  7:42             ` Ludovic Courtès
2005-10-19 22:23               ` Neil Jerram
2005-10-20  1:22                 ` Kevin Ryde
2005-10-20  7:59                   ` Ludovic Courtès
2005-10-20 19:30                     ` Kevin Ryde
2005-10-20 21:27                       ` Neil Jerram
2005-10-20  7:48                 ` Ludovic Courtès
2005-10-20 10:52                   ` Tomas Zerolo
2005-10-20 14:42                     ` Ludovic Courtès
2005-10-20 22:09                   ` Neil Jerram
2005-10-21  7:43                     ` Ludovic Courtès
2005-10-24 11:43                       ` Ludovic Courtès
2005-10-28 21:26                       ` Neil Jerram
2005-10-28 22:38                         ` Kevin Ryde
2005-10-29  8:58                           ` Neil Jerram
2005-10-30 19:55                             ` Neil Jerram
2005-11-07 16:06                               ` [PATCH] Per-module reader, take #3 Ludovic Courtès
2005-11-16 21:13                                 ` Neil Jerram
2005-11-17 10:03                                   ` Ludovic Courtès
2005-11-20  0:15                                   ` Marius Vollmer
2005-11-21 12:55                                     ` Ludovic Courtès
2005-12-03 20:02                                     ` Neil Jerram [this message]
2005-12-05  8:31                                       ` Ludovic Courtès
2005-12-07  0:04                                       ` Marius Vollmer
2005-12-14  1:00                                         ` Neil Jerram
2005-12-14 14:06                                           ` Ludovic Courtès
2005-12-14 19:37                                             ` Neil Jerram
2005-12-15  9:13                                               ` Ludovic Courtès
2005-12-15 19:47                                                 ` Neil Jerram
2005-12-16  6:13                                                   ` Tomas Zerolo
2005-12-16  8:32                                                     ` Neil Jerram
2005-12-16  9:21                                                       ` Tomas Zerolo
2005-12-16  8:55                                                   ` Ludovic Courtès
2005-12-17 10:26                                                     ` Neil Jerram
2005-12-17 13:09                                                       ` Marius Vollmer
2005-12-29 10:27                                                         ` Neil Jerram
2006-01-11 16:45                                           ` Ludovic Courtès
2006-01-13 17:38                                             ` Neil Jerram
2005-10-19 22:56     ` [PATCH] Per-module reader Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8764q6kkyv.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).