Re: Just curious: who is using Pike for what?

Chris Angelico <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAPTjJmriqWfWQZXNqtXpumU+OgQxmSOnu8qovHYU6SanrCCiag@mail.gmail.com>
On Wed, Dec 14, 2016 at 11:45 PM, Peter Bortas @ Pike  importmöte för
mailinglistan <[email protected]> wrote:
> With my compatibility maintainer hat on that is a major
> change. Potential compatibility problems:
>
> * strings start changing lenght.
>
> * lower_case() and upper_case() as used for normalization before
>   string comparisons change. Granted, the change will sometimes be for
>   the better, but still a change.

If you're doing it for case insensitive comparisons, the true solution
is to add case_fold. The Unicode standard has strong promises of
backward compatibility regarding case folding, plus it's guaranteed to
be idempotent (unlike messing with upper- and lower-casing, which can
take several iterations to stabilize).

That would be a change in user-level code, though, so it'd be a new
feature rather than any sort of backward compatibility break. If
you've been using lower_case (or upper_case) on user input and then
storing the result, your code is *already wrong*, and an update to a
new version of UnicodeData.txt could break your code already.

ChrisA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.