Re: Requests for comments -- raw strings and WRITE
Vincent Manis (he/him) 08 Mar 2026 19:05 UTC
On 2026-03-08 10:31, Peter McGoron wrote:
> Members of WG2 for standardizing R7RS-large voted to incorporate SRFI
> 267's raw string syntax. Some members indicated their preference for
> the WRITE procedure to be allowed to write raw strings.
>
> If this were adopted, the specification would have the additional line:
>
> > Implementations are allowed to output a raw string when WRITE is
> used to output a string, as long as reading that string with READ will
> result in the a string that is EQUAL? to the original string.
>
> I discovered after the meeting that this would be an incompatibility
> with R7RS-Small:
>
> > [WRITE] writes a representation of obj to the given textual output
> port. Strings that appear in the written representation are enclosed
> in quotation marks, and within those strings backslash and quotation
> mark characters are escaped by backslashes. [...]
>
I think I'd go back to my original proposal during the meeting, leave
the SRFI silent, and add a procedure write-fancy-string to Batteries.
(Incidentally, this procedure will have to be told what delimiter string
to use. -- vincent