Case sensitive and ludicrous statements (was: True, False, None)

Douglas Alan nessus at mit.edu
Fri Dec 5 13:10:02 EST 2003


Peter Hansen <peter at engcorp.com> writes:

> Douglas Alan wrote:

>> > I never understood why you advocate case insensitivity. I would
>> > expect case insensitivity to be a source of bugs: for instance,
>> > identifiers with similar names could be confused (es. myfunction
>> > vs. myFunction): one would expect them to be different (at least
>> > people coming from case insensitive languages) whereas they would be
>> > the same.

>> When you use a case-insensitive language, you do not typically use
>> StudlyCaps at all, so you wouldn't ever write "myFunction".  Instead,
>> you would write "my_function" or "my-function", depending on the
>> language.  

> This is the second ludicrous thing I've seen you write today.  The
> first was when you claimed Fredrik Lundh was "dead wrong" about the
> use of tuples vs. lists, when your own view is in direct contradiction
> to a very widely used convention in the Python programming world,
> and supported by the FAQ entry and Guido's own views.

He was dead wrong to resort to ad hominem attacks in a debate over
programming aesthetics, for which my position is completely reasonable
and supported by other respected and accomplished software engineers.
The idea that people should resort to insults in this type of debate
is what is ludicrous, and I feel should be something of an
embarrassment to the Python community.  I have met people who use Perl
and can't be convinced to try Python merely because they have gathered
an opinion that Python devotees are rude and unfriendly, and they'd
rather stick with the friendly Perl people.  And who can blame them?
Who wants to join a community where unwarrented insults are the
norm?

> When *I* have used case-insensitive languages, I have certainly used
> various forms of capitalization to represent different types of 
> information, such as functions or constants.  I am definitely not
> alone in this approach, as I have learned it from reading others' 
> code.

If you are talking merely about putting constants, or somesuch, in all
upper case, then perhaps there is a significant minority that does do
this, but this doesn't typically open oneself up to numerous
opportunities for confusion, and might merely fall under my
description of using upper case for emphasis.  Some people, for
instance, put all syntax keywoards in upper case for emphasis, though
personally, I find that practice to be ugly.

If, on the other hand, you are referring to using StudlyCaps (aka
CamelCase) in a case-insensitive language, then we have a serious
disagreement.  I have read and written a lot of code in
case-insensitive languages, and I have never seen anyone code as you
say.  There may certainly be people out there who do so (it sounds as
if such people have trouble breaking their case-sensitive habits), but
that doesn't mean it is a good idea.  You can do whatever you want to,
but then you open yourself up to just the sort of maintenance
headaches that the previous respondent was complaining about.
Consequently, it would appear to be a bad idea.

> *You* might not do so, but your opinions are clearly not held by
> all other programmers,

Clearly not.  The existence of Perl is conclusive proof of that.

> nor perhaps even the majority, so please stop writing as though they
> are.

Regarding tuples, I never said that I represented any kind of majority
-- only what is obviously correct to *me* and some other accomplished
people.  Regarding case-insensitive languages, according to my
experience, I do represent the vast majority and to plain common
sense.

|>oug




More information about the Python-list mailing list