[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Surrogates and character representation



Per Bothner scripsit:

> It's the other way round.  Using UTF-8 as in internal representation is 
> just fine for *applications*.  The problem is that certain *API*s have a 
> concept of indexing into a string, and unfortunately R5RS is one of 
> them.  In itself indexing of strings is a useless feature, as it can be 
> replaced by a sequential-access cursor/iterator API - but historically 
> the Scheme cursor/iterator API uses integers for the "cursor".  And 
> existing code moves the "cursor" forwards by adding 1.

By the same token, random-access disks are a useless feature, for they
can be replaced by sequential-access DECtapes that can be rewound and
selectively rewritten.  But at a price.

-- 
Where the wombat has walked,            John Cowan <jcowan@xxxxxxxxxxxxxxxxx>
it will inevitably walk again.          http://www.ccil.org/~cowan