Case insensitivity

Pekka Pessi Pekka.Pessi at
Sat Jul 21 20:52:10 CEST 2001

In message <cpvgkofyru.fsf at> Guido van Rossum <guido at> writes:
>My own intuition and experience tells me that there seem to be two
>kinds of people: some folks think case-sensitively, others think
>case-insensitively.  Myself, I am a case-sensitive person, but I can
>easily learn to work with case-insensitive systems.  It's possible
>that most programmers have case-sensitive minds, but I think that most
>non-programmers probably have case-insensitive minds.  And
>non-programmers are quite the majority. 

        Most non-programmers like to use identifiers in their native
        language.  Some people are happy with US-ASCII (like, Swahili,
        and perhaps Dutch), most Europeans are content with ISO Latin 1,
        but the vast majority would like to use Unicode.  Currently
        Python supports ISO Latin 1, but I think that Unicode is the
        future.  In my opinion, supporting Unicode is more valuable for
        more people than case-insensitivity.

>*If* there is any hard scientific evidence that case-sensitivity is a
>hindrance to learning to program (for most people), that would confirm my

        I have some experience of teching programming with AmigaBASIC by
        Microsoft, which was both case-insensitive and had ISO-Latin-1
        identifiers.  So, one could write program like this:

PRINT lapsi3

        However, this would not work. The Microsoft programmers were not
        clever enough to extend case-insensitivity to ISO-Latin-1
        characters: LAPSI2 is same as lapsi2, LAPSI1 is same as lapsi1 -
        but ISÄ is not the same thing as isä, nor ÄITI same as äiti.
        Now *this* is nasty surprise.

        *Broken* case-insensitivity is not a minor wart.  Calling it
        hindrance would be an understatement.  It is a major pain.

        However, implementing the case-insensitivity properly is a real
        hurdle.  With Latin1, one may argue that it is doable, but
        actually you would have to known the language in which the
        identifiers are written (because casing rules vary from language
        to language). Doing that with Unicode is next to impossible.
>To me, the only real important question is, how can we introduce
>case-sensitivity for novices without breaking the millions of lines of
>existing Python code.  One option could be: forget it, it's too late.

        If you plan to do it *properly*, go for it.  Otherwise, forget

>Another: put the case-insensitivity in the tools.

        That would be easier, and much more valuable (the tools could
        fix typos and propose similar sounding indentifiers, as well).


More information about the Python-list mailing list