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.

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.
 
There is, for example, no "string->string" procedure
for parsing the external representation of strings.

True.  But there should be some way to convert between the external format and bytevectors that does not require extending `read` and `write`.  I think the above design works well for that.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
He that would foil me must use such weapons as I do, for I have not
fed my readers with straw, neither will I be confuted with stubble.
                        --Thomas Vaughan (1650)