[r6rs-discuss] [Formal] String positions and string slices
John Cowan wrote:
> 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.
I think the best way to retain backward compatibility is to create a new
text abstraction in parallel with the historical strings. The
historical string abstraction should remain vectors of 8-bit (or 7-bit)
characters with side effects. The new text abstraction should be based
on Unicode. I think trying to bridge the difference between these two
with a hybrid approach has little to recommend it.
> That eliminates any chance of them being lightweight fixnums.
I'm not that interested in the lightweight-fixnum optimization (at the
moment, at least), but Taylor has pointed out to me that positions
should be valid in slices as well as in the text they are sliced from.
That argument has sold me.
Received on Tue Apr 10 2007 - 00:11:27 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC