unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Noah Lavine <noah.b.lavine@gmail.com>
To: Andreas Rottmann <a.rottmann@gmx.at>
Cc: Mark H Weaver <mhw@netris.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: Fix reader options for R6RS `get-datum'
Date: Mon, 17 Dec 2012 14:30:29 -0500	[thread overview]
Message-ID: <CA+U71=MTNnMJhYnT5_Ar2wdvoaTD2DmYgCEEKq7w9tdh0tSAKQ@mail.gmail.com> (raw)
In-Reply-To: <87a9tcebyy.fsf@delenn.home.rotty.xx.vu>

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Hello,

On Mon, Dec 17, 2012 at 2:05 PM, Andreas Rottmann <a.rottmann@gmx.at> wrote:

> I think this is my assumption that you seem to disagree on: by using the
> binding of `read' from `(rnrs io simple)', instead of the one provided
> by Guile's core, the writer of the code using that binding has declared
> that he wishes `read' to adhere to R6RS.


I actually disagree with this assumption too, but let me explain why. I
think there are some situations where it is right and some where it is
wrong.

A program will want strict R6RS semantics (as Rotty says) if it is, for
instance, reading from a data file in a strictly-defined format. In that
case, it might have written its parser assuming an R6RS-compliant `read'
function, and it could fail if it gets an extended `read'.

However, the R6RS reader would be wrong for a program that wants to, say,
read a file of Scheme code as S-expressions and manipulate it. The program
would have to be written using R6RS libraries to be portable, but the right
thing for it to do in any particular Scheme implementation is to read
exactly the same syntax as that implementation. (This is a bit of a
contrived example, but I hope you can see my point that some programs don't
want strict R6RS semantics as much as they want to integrate with whatever
extensions their host implementation has made to `read', and that what they
really want is a portable way to access the built-in `read'.)

If you believe both of these examples, then programs need to be able to
choose their own meaning. Perhaps the solution is a procedure like
`strict-r6rs-read-options' for programs that want that, or alternatively
`native-read-options' for programs that don't.

Regards,
Noah

[-- Attachment #2: Type: text/html, Size: 2091 bytes --]

      reply	other threads:[~2012-12-17 19:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-09 12:47 Fix reader options for R6RS `get-datum' Andreas Rottmann
2012-12-09 12:47 ` [PATCH 1/3] Split r6rs-ports.c according to module boundaries Andreas Rottmann
2012-12-15  5:35   ` Mark H Weaver
2012-12-15  5:38   ` Mark H Weaver
2012-12-09 12:47 ` [PATCH 2/3] Add internal API to specify reader options at reader invocation Andreas Rottmann
2013-01-21 20:44   ` Andy Wingo
2012-12-09 12:47 ` [PATCH 3/3] Make `get-datum' conform more closely to R6RS semantics Andreas Rottmann
2013-01-21 20:48   ` Andy Wingo
2012-12-11 20:23 ` Fix reader options for R6RS `get-datum' Mark H Weaver
2012-12-12 21:32   ` Andreas Rottmann
2012-12-12 23:48     ` Mark H Weaver
2012-12-14  3:22       ` Andreas Rottmann
2012-12-16 22:12         ` Mark H Weaver
2012-12-17 19:05           ` Andreas Rottmann
2012-12-17 19:30             ` Noah Lavine [this message]

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='CA+U71=MTNnMJhYnT5_Ar2wdvoaTD2DmYgCEEKq7w9tdh0tSAKQ@mail.gmail.com' \
    --to=noah.b.lavine@gmail.com \
    --cc=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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).