No subject


Mon Aug 17 16:01:24 EDT 2009


> A valid abstraction from bytevectors to strings could be made; strings
> can be implemented correctly in terms of bytevectors, enforcing a
> choice of representation by fiat.

Indeed.

> We could move all the character and string operations to libraries
> and make bytevectors primitive

The only reason blobs aren't part of the core in my small Scheme
proposals is that they *can* be emulated with general vectors.  I would
hope that a small Scheme implementation would support them directly,
though, and I intend to write a SRFI about them.

> (and I'd recommend it if I could figure out how to make the _syntax_
> for string and character literals importable from a library).

I've struggled with that too.  See my proposal for semi-scoped extensible
syntax; it's linked at the bottom of http://tinyurl.com/thing-one .

> But abstracting in the other direction, as we had been doing before
> bytevectors came along in R6 and as a lot of older code still does,
> is invalid in the presence of choices about how to represent strings.

Absolutely.  Even if there was only one known encoding of characters
(which has never been true, ever), it would be data punning: bytes are
not really the same semantic domain as characters.

-- 
If you have ever wondered if you are in hell,         John Cowan
it has been said, then you are on a well-traveled     http://www.ccil.org/~cowan
road of spiritual inquiry.  If you are absolutely     cowan at ccil.org
sure you are in hell, however, then you must be
on the Cross Bronx Expressway.          --Alan Feuer, NYTimes, 2002-09-20



More information about the r6rs-discuss mailing list