case sensitivity redux (was Re: Language change and code breaks)

Alex Martelli aleaxit at yahoo.com
Thu Aug 2 09:55:18 EDT 2001


"Quinn Dunkan" <quinn at retch.ugcs.caltech.edu> wrote in message
news:slrn9mgqq1.9ma.quinn at retch.ugcs.caltech.edu...
> On Tue, 31 Jul 2001 11:24:18 +0200, Alex Martelli <aleaxit at yahoo.com>
wrote:
> >One aspect I haven't seen mentioned in this huge thread is the
> >issue of visually impaired programmers.  Case sensitivity is an
> >extra burden for such people (with whom I strongly empathize: my
> >sight is still OK, sufficient to drive a car &c, but it's going
> >downhill with time, and I must face the very real possibility
> >that I'll be _seriously_ visually impaired a few years from now).
>
> I don't see what case insensitivity in the language would give you over a
> case-correcting editor, aside from you having to use the case correcting

The problem is when two different identifiers in the same
scope ONLY differ by case (which is what it means for a
language to be case-sensitive, after all).  I haven't yet
found any case in the standard libraries where this is
*exploited* -- i.e., I suspect Python's standard libraries
would work just fine if Python *were* case-insensitive.

But if it ever happens, then the 'case-correcting editor'
isn't going to be able to do very much about it -- it
wouldn't let you ENTER such a program in the first place,
but what's supposed to happen when you fire it up on a
piece of code that's already thus wretchedly written?

I'd like a casenanny switch on python, similary to the
tabnanny... get at least a warning, optionally an error,
if any code ever *DEPENDS* on case-sensitivity (changes
meaning because case is meaningful, compared to what it
would mean if case wasn't meaningful).  If we can run the
tests on the standard libraries with that switch set to
permanently-on, and establish this as a reasonable style
guideline for the standard libraries, then it only remains
to sensitize third-party authors of cool stuff that it
would be more sensitive of them to do the slight edits
to their code to make it insensitive to case-sensitivity.
If you sense my drift...


Alex






More information about the Python-list mailing list