case-sensitivity

Ron Adam radam2 at tampabay.rr.com
Wed Nov 12 17:09:35 EST 2003


On Wed, 12 Nov 2003 12:35:04 -0500, Douglas Alan <nessus at mit.edu>
wrote:

>I agree with Alex.  Case sensitivity is evil!  When color monitors
>started becoming common, I began to worry that programming languages
>would come to allow you to have blue variable names, and red and green
>variables names, and they would all be different.  Or maybe even
>variable names in mixed color!  Then in mixed color and font.  I
>better be quiet now, lest I give anyone ideas.
>
>|>oug


I also agree with you and Alex.  Although I may differ on the
reasoning.

Since python tends to go the way of user practicality in many cases,
this seems to me to be counter to that.   The only reason to use case
sensitivity is as a way to differentiate names.   In my opinion its
not needed in python because there are other better ways to
differentiate names. 

This is one of the items that consistently caused me errors as I
learned python.   It is nearly opposite of  some other languages which
used case to emphasize syntax and language specific keywords but 
were in them selves non-case sensitive.  

For example if a variable was a built in constant, the editor would
capitalize it for me.  By doing that it helps to increase readability
and reduce programming errors in the same way that editors use colors.
At the same time it is much easier to type in lowercase and not have
to worry about putting the caps in the right place.  That has both
benefits of  easy to type lower case and the improved readability of
using mixed case. 

Since python is an objective language,  many of the names are
properties of objects and follow the form of <object>.<name>.  This
feature of python is in my opinion more than enough to keep names from
interfering with each other in most cases.  Thus 'foo.True' can be
different from the built in 'True'.  And entering  'true' can and
should work in place of 'True' so that both forms are acceptable.
Personally I like 'True' to be capitalized but I don't want to have to
remember to type it in that way.

I think case is a useful tool and adds readability to programs when
used,  but I don't think requiring it is necessary.   If I have so
many variables that I run out of meaningful names,  (I have yet to
write a program that does that),  then I probably need to make better
use of lists and tuples.

_Ron Adam















More information about the Python-list mailing list