Case-sensitivity: why -- or why not? (was Re: Damnation!)

Mike Fletcher mfletch at tpresence.com
Sun May 21 00:22:27 EDT 2000


Personally, I have been bit by case problems probably five or six times (in
five years or so).  That said, I find working with case insensitive
languages difficult to the point where I will not use them (particularly in
large projects, and particularly where there are multiple people working on
the project).  In general, I find that I don't "read" variables, rather I
"recognize" them as I gaze at entire blocks of code, largely based on their
graphic representation (which is largely based on the pattern of character
glyphs). Case insensitive languages make this "recognition" difficult
(particularly when different programmers use different capitalization
patterns).

For new users (and infrequent users), who generally are "reading" and
"writing" the language word by word, case insensitivity may be helpful.  For
me, while "reading" entire phrases (or sentences) of code, having to focus
on each word slows me down considerably. It's not that I cannot do it, it's
just not as efficient for me. From what I've seen, this may be a common
phenomenon (the practice of font design seems to bear it out).

I would suggest that any case insensitive system be implemented as an editor
aide.  If this is to be an educational system, have the system train the
user (gently) to use case sensitive operations (which are common in most
programming languages).  An editor which has a mode where a potential case
failure is "flagged" with a pop-up saying "potential case mismatch", with an
auto-complete drop-down showing the already used casing would likely be
sufficient for beginners, while being easily turned off for more advanced
users. Similarly, when a name error is encountered, have the beginner mode
in the editor search the for equal-save-case names, and suggest
capitalisations.

My thoughts,
Mike



-----Original Message-----
From: Guido van Rossum [mailto:guido at python.org]
Sent: Saturday, May 20, 2000 10:02 PM
To: python-list at python.org
Subject: Case-sensitivity: why -- or why not? (was Re: Damnation!)


"Thomas Malik" <340083143317-0001 at t-online.de> writes:

> I've just convinced our whole department (at a german bank) to use Python
> instead of Perl. A case - insensitive language won't be acceptable by any
of
> us. So, Guido, should i start looking for another job ...?

This is an example of what I meant when I said "voting doesn't help".

You're saying it's unacceptable -- a vote.  But you don't say *why*
you vote that way, so your vote gets multiplied by zero (rather than
by the size of your department or the capital of your bank, as you
seem to hope by bringing them into the argument :-).

Here's a way to make your vote count: explain what it is about case
sensitive languages that you hate.  Then we can have a discussion
about it.

I am a very case-sensitive person myself: it bothers me when people
don't start their sentences with capital letters or when they refer to
themselves as "i" in lowercase -- or when people refer to Python as
"python" or "PYTHON".  (Come to think of it, it bothered me when you
wrote "german" instead of "German" :-).

Yet, here are some of the reasons why I am considering making Python
case-insensitive:

(1) Randy Pausch, a professor at CMU, found, when teaching Python to
non-CS students in the context of Alice (www.alice.org), that the
number one problem his students were having was to remember that case
matters in Python.  (The number two problem was 1/2 == 0; there was no
significalt number three problem.)

(2) I've met many people who are experienced and accomplished Python
programmers but who still, when referring to Python modules or
functions in an informal context (e.g. email), make up their own case
conventions.  E.g. people will write me about the String module or
about FTPLib.

I also know some of the things I plan to do to make the transition
painless and to make the usual problems with case insensitivity more
palatable.  E.g. I may add a case insensitivity feature to IDLE which
makes sure that all identifiers are written in a consistent case, I
may add flags to pre-Py3k Python interpreters to turn on case
insensitivity or case sensitivity or a special warning mode.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list