Re: New draft (#4) of SRFI 207: String-notated bytevectors
Wolfgang Corcoran-Mathe 06 Oct 2020 05:43 UTC
On 2020-10-05 20:21 -0400, John Cowan wrote:
> On Mon, Oct 5, 2020 at 3:18 PM Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
> wrote:
>
> > But I'm wondering now if perhaps string->bytestring is a confusing
> > idea, at least in name. string->bytestring and bytestring->string are
> > basically read/write with string-port I/O, respectively.
>
> I modeled them on string->bitvector and bitvector->string from SRFI 178.
> But now I think that xxxxxx@vector and xxxxxx@vector from SRFI 160 is a
> better model, so I've changed it thus: read-textual-bytestring reads the
> bytestring format from a port and returns a bytevector;
> write-textual-bytestring writes a bytevector to a port in the bytestring
> format; write-binary-bytestring is the former write-bytestring.
Thanks, I *vastly* prefer these port procedures. I've updated my copy
of the sample implementation.
> As for #vu8"foo", let's drop it. Just because ordinary bytevector literals
> are #vu8(...) on R6RS doesn't mean that bytestring literals have to be
> #vu8"..."; they can be uniform for both R6 and R7 implementations.
Looks good to me.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Prolonged contact with the computer turns mathematicians into
clerks and vice-versa." --Alan J. Perlis