[r6rs-discuss] Comparing Strings

From: Per Bothner <per>
Date: Thu Mar 15 01:12:41 2007

John Cowan wrote:
> The real problem is that char-foldcase is defective, and essentially so;
> in a Unicode world, string functions just aren't character functions
> lifted to the domain of sequences. If I had my druthers, there'd be
> no character type at all, anywhere.

That would also allow us to get of the concept of indexing into a
string as if it were an array.

It would make UTF-8 the efficient and preferred representation
for strings (at least on most C-based implementations).

Instead of an index into a string you could use a cursor - i.e. an
opaque position in a string.

Alternatively, one can use substrings delimited by markers into
a string, like an Emacs buffer.

We'd get rid of the useless construct of a mutable fixed-size array
and replace it by a variable-sized buffer. The fundamental operation
would be replacing a sub-string by some other string value.

You'd have two kinds of strings: string-constant and string-buffer.

Oh well, I can dream. Maybe for R7RS we can relegate characters,
along with string-ref and string-set! to a compatibility library ...
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Thu Mar 15 2007 - 01:11:36 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC