Case sensitivity/insensitivity

Will Rose cwr at crash.cts.com
Sat May 20 07:48:36 CEST 2000


Courageous <jkraska1 at san.rr.com> wrote:


: I thought about this for a while, and my suspicion is that
: the first negative reaction that people have against case
: insensitivity is probably the instinctive (and false) idea
: that everyone would be writing python programs without case.

: The occasions in which you really want to have variables/
: attributes which differ by case alone are quite rare. About
: the only time I have ever seen this regularly is in some
: types of code where accessors (in c++/java) differed from
: private attributes only in case, ala:

: class Myclass
: {
: 	private int      myvar;
: 	int Myvar();
: }

: I can't really see any other real use of actual case sensitivity
: in the language. Does anyone out there actually make use of
: case sensitivity?

: Truly curious.

Yes, but not often; mostly for the sort of code you describe above.
However, _reading_ case-preserving, case-insensitive code is all
pain.  You have to be able to match 'matchthis' with 'Matchthis',
'MatchThis' and 'MATCHTHIS' on the fly.  You could build tools to
do the matching and checking for you, but it's a lot easier if the
code is readable by humans.

: I guess what I'm saying is, now that I think about it,
: "so what, no big loss."

: Kind of like the braces, only far less consequential.

Well, I can live with Python whitespace, tho' I much prefer being
able to format my code for readability.  I can't live with StUdLyCaPs.
As I'm just cranking up for a major outburst of Python, I'd really
like an answer to this one; I'll hang on until the FAQ comes out.


Will
cwr at cts.com




More information about the Python-list mailing list