[r6rs-discuss] perhaps i should be formal, but....

From: John Cowan <cowan>
Date: Thu Mar 15 17:20:07 2007

MichaelL_at_frogware.com scripsit:

> Are you suggesting that indexes represent code points rather than code
> units?

That is what R5.92RS prescribes, and I think appropriately.

> Have you? And do you think UTF-8/UTF-16 implementations should be
> *required* to do that?

If they claim to implement R6RS, then yes. But there is no requirement
that R6RS implementations use UTF-8 or UTF-16 internally.

> (Obviously, then, string-length would have to return the number of
> code points rather than the number of code units.)

Just so.

> Note: Perhaps a solution is to have two variants of the procs, one for
> code points and one for code units. The code units variants would
> guarantee O(1) and the code point ones wouldn't.

In R5.92RS, Scheme characters are codepoints (or more precisely scalar
values), not code units.

-- 
John Cowan  cowan_at_ccil.org  http://www.ccil.org/~cowan
Thor Heyerdahl recounts his attempt to prove Rudyard Kipling's theory
that the mongoose first came to India on a raft from Polynesia.
        --blurb for Rikki-Kon-Tiki-Tavi
Received on Thu Mar 15 2007 - 17:20:01 UTC

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