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

Re: case mappings

This page is part of the web mail archives of SRFI 75 from before July 7th, 2015. The new archives for SRFI 75 contain all messages, not just those from before July 7th, 2015.

Matthew Flatt <mflatt@xxxxxxxxxxx> writes:

> I appreciate this line of reasoning, and I'm now convinced that SRFI-75
> (and R6RS) should include locale-independent procedures
>   string-upcase
>   string-downcase
>   string-titlecase
> that use the locale-independent part of SpecialCasing.txt. I'll add
> that to the SRFI, pending further discussion.


(Can we have an optional locale argument too?)

> Although I agree that the 1-1 mapping is of limited use, my impression
> and experience is that it's still useful (if, for nothing else,
> interfacing to older code that uses a 1-1 mapping). So, pending further
> discussion, I will leave the character-casing operations in place.

Can we specify exactly what these return in terms of string-*case?

Perhaps char-upcase should return the first character of the result of
string-upcase on a one-character string.

I once did a survey of the code I had written which did case mapping,
and I discovered, to my surprise, that I did not need even *one* case
of char mapping.  In every case where I used char mapping functions,
it was in some kind of loop across a string.  In the years since, I
keep track, and I still haven't found a situation where the char
functions were needed and string functions were not better.

Also, we need string-caseindependent-= or something of the kind.