On Sun, 2009-09-20 at 22:19 -0700, Ray Dillinger wrote:
> Isn't it true that the "more general" uses of strings would 
> all be equally or better served by binary buffers (bytevectors,
> uniform numeric vectors, whatever)?

I don't think so.   For example, I like the idea
of using codepoints with buckybits as the names
of keyboard events.  It's a parsimonious choice
because it gives me a human-friendly print/read 
syntax for individual events and sequences of 
events.  I can sort a set of strings representing
key sequences using string<?.  Compare two for 
equality using string=? or string=-ci?  Take
substrings.  Concatenate strings.  Even upcasing 
and downcasing are useful.

I'm inclined to think of the string-* operations
as (ideally extensible) generics.


> I don't know about you but I *do* regard strings primarily as 
> text intended for human readability and to be manipulated in 
> linguistically (or at least character-oriented) significant 
> ways.  Whenever I find myself doing something else with one, 
> I realize that I am no longer using it as a string.

What counts as a linguistic use gets a bit 
fuzzy, though, as the example of keysequences
shows.

-t




On Sun, 2009-09-20 at 22:19 -0700, Ray Dillinger wrote:
> On Sun, 2009-09-20 at 12:17 -0700, Thomas Lord wrote:
> > On Sun, 2009-09-20 at 08:56 -0700, Ray Dillinger wrote:
> 
> > > This is why I believe that the best semantics for string-length, 
> > > indexes in strings, etc, is that they should count characters 
> > > rather than codepoints.  And this is one of the things that I 
> > > believed then and still believe now that R6RS got wrong.
> > 
> > That's a reasonable view when a string is being regarded
> > primarily as human text to be manipulated in linguistically
> > significant ways.   Strings as a data structure are more 
> > general than that, though.
> 
> Isn't it true that the "more general" uses of strings would 
> all be equally or better served by binary buffers (bytevectors,
> uniform numeric vectors, whatever)?
> 
> I don't know about you but I *do* regard strings primarily as 
> text intended for human readability and to be manipulated in 
> linguistically (or at least character-oriented) significant 
> ways.  Whenever I find myself doing something else with one, 
> I realize that I am no longer using it as a string.
> 
>                               Bear
> 
> 


_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to