Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 18:51 UTC)
Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen (13 Jun 2023 19:35 UTC)
Re: Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 19:59 UTC)
Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen (15 Jun 2023 14:43 UTC)
Re: Finalizing SRFI 243: Unreadable Data Daphne Preston-Kendal (13 Jun 2023 20:11 UTC)
Re: Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 20:37 UTC)
Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen (13 Jun 2023 20:57 UTC)
Re: Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 21:17 UTC)
Re: Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 21:32 UTC)
Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen (14 Jun 2023 06:06 UTC)
Re: Finalizing SRFI 243: Unreadable Data Lassi Kortela (13 Jun 2023 21:00 UTC)
Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen (14 Jun 2023 16:18 UTC)

Re: Finalizing SRFI 243: Unreadable Data Marc Nieper-Wißkirchen 14 Jun 2023 06:06 UTC

Am Di., 13. Juni 2023 um 23:17 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
>
> > The principal domain of the write procedure are datum objects, which
> > possess a written representation. As long as one does not use write
> > outside this domain, nothing is inconsistent and write works as
> > intended (namely for textual exchange of datum objects).
>
> That's the literal meaning of current editions of RnRS, but Scheme and
> Lisp don't stop there. It's clear that all implementations have
> unreadable objects and something must be done about writing them.

And Scheme implementations do something about writing them (e.g.
raising an exception, writing some text, looping forever, ...). What
they do is implementation-specific, but this would not change with
SRFI 243.

I still don't see the need for a fix, and even if I did, I don't see
that SRFI 243 would fix it.

> > What is the precise definition of "self-consistent"?
>
> I'm not aware of a precise definition. "Read-write invariance" comes
> close, but unreadable objects cannot have that property.
>
> For example (write '("one" "two")) will output:
>
> ("one" "two")
>
> whereas (display '("one" "two")) will output:
>
> (one two)
>
> The `write` representation consistently mirrors the structure of the
> object it was told to write. But the `display` representation is
> inconsistent with the original object: what was one string now looks to
> `read` like two symbols.
>
> `display` is explicitly designed to act like that, but `write` is
> intended to produce structurally consistent lexical syntax. If `write`
> produces something like #<a b c> it looks like the three symbols `a` `b`
> and `c>`. That interpretation doesn't match the input (which was
> intended to be the three symbols a b c), even if the reader is aware of
> the `#<` prefix.

I asked because the current text of SRFI 243 suffers from some
undefined terminology, like "well-formed S-expression", etc. I would
like to encourage you to look at the terminology introduced in Chapter
4 of the R6RS, which is quite precise and is aware of subtleties.