[r6rs-discuss] [Formal] String positions and string slices

John Cowan cowan at ccil.org
Mon Apr 9 23:27:10 EDT 2007


Chris Hanson scripsit:

> Given this view, I think that strings should be read-only, and that
> operations like string-length and string-ref are a bad idea.  

I like that idea too, but I wanted to maintain as much backward
compatibility as practical.

> should be pointers into strings that can be used to ask questions like
> "what is the character on my right (or left)?" and "is there a character
> to my left (right)?".  Positions shouldn't be independent of the strings
> they reference, they should instead incorporate those strings.

That eliminates any chance of them being lightweight fixnums.

Bug: I forgot to have an alternative to string-ref that works in
terms of positions.  Please consider that included.

-- 
The Unicode Standard does not encode            John Cowan
idiosyncratic, personal, novel, or private      http://www.ccil.org/~cowan
use characters, nor does it encode logos
or graphics.                                    cowan at ccil.org



More information about the r6rs-discuss mailing list