I would merge the two ideas:  `write-unreadable` outputs "#<", a datum as
if by `write`, and ">" in that order, and #< is required to signal an error
satisfying read-error?.  That's enough for a SRFI.

On Sat, Dec 17, 2022 at 8:40 AM Lassi Kortela <[email protected]> wrote:

> I tried to play around with the #< syntax some more. Still can't find
> anything that looks good and could be parsed reliably. It makes sense
> for RnRS to cause a syntax error upon encountering #< but beyond that,
> there isn't anything to say about it. I can't dedicate a whole SRFI to
> saying one sentence.
>
> Given that Shiro and I are the only ones so far who like the proposed
> #?datum syntax, I'll hold off on proposing it in this SRFI and retarget
> the SRFI to specify a `write-unreadable` procedure instead.
>
> The idea is that (write-unreadable list [port]) writes a representation
> of an unreadable object to the given port. It's given a list with one or
> more items. The first item is a symbol indicating what type of object is
> being represented; the rest can be arbitrary objects giving extra detail.
>
> The lexical syntax to write is implementation-defined; can be #<foo
> ...>, #[foo ...], #?(foo ...), or something else.
>
> In the future, some Scheme implementations will probably be able to
> write more than one kind of syntax. Syntax settings should probably be
> associated with port objects. So (write foo some-port) and
> (write-unreadable foo some-port) would both use the appropriate syntax
> for some-port.
>
> Does this sound reasonable, given the circumstances, or should I do
> something else?
>
>

Reply via email to