CamelCase versus wide_names (Prothon)

Jimmie Houchin jhouchin at texoma.net
Mon Apr 19 12:31:53 EDT 2004


On Fri, 16 Apr 2004 18:04:07 -0400, Jack Diederich <jack at performancedrivers.com>
wrote:

>On Thu, Apr 15, 2004 at 11:05:29AM -0700, Mark Hahn wrote:
[snip]
>> Now I'll go through all the Python method and var names and convert them all
>> to camelCase for Prothon.  It shouldn't be a problem for users since the
>> conversion is mechanical.
><blood curdling scream>Noooooo!</bcs>
>
>As others have pointed out down the thread, don't just go on the first
>several replies.
>
>I'm a wide_case_fanboy, having done mixedCase and wide_names over the last
>fifteen years.  It all comes down to personal preference, of course.  IMO
>mixedCase people tend to be younger, and younger people tend to be more
>zealous on newsgroups.

Age has little to do with this. It probably has more to do with the environment
in which the person learned programming or does their programming.

mixedCase is minimally as old as Smalltalk 76. mixedCase it "the" way you define
names in Smalltalk. So there is a minimum of 28+ years of mixedCase programming.
Some of the oldest programmers I know of are Smalltalkers. I do not even claim
that Smalltalk originated mixedCase

>I'm also a native English speaker, so this_looks_like_words while
>thisLooksAwkward.  I can read/write both and do depending on who is paying
>for the project, but I much prefer the underscores.  I can also type 100+
>words per minute (much faster than I can think) so I'm limited by figuring
>out what I want to do and not by hitting shift-minus.

Smalltalk was developed by and for native English speakers. It was aimed at
being syntactically suitable for children. Squeak is being used to teach
elementary school children across the world. http://www.squeak.org

Squeak is an open source Smalltalk 80 implementation which has progressed over
the years.

>Mixed case works fine on two word variables because twoWords are as easy
>to read as two_words.  But it gets painful forLongerVariableNames.
>I'm a big fan of descriptive names and since mixed case seems to discourage them
>when N > 2 that is enough reason to dislike it.

Smalltalk also is a big fan of descriptive names.

>My assertion that mixed case fanboys are young and therefore loud while
>at the same time being too inexperienced to know the difference is harsh and
>I'm sure a 65 year old programmer will post as a counter example.  They
>are called stereotypes because they work /most/ of the time, if they worked
>/all/ of the time they would just call them truths. *wink*

Most of your arguments show your preference which is fine. But I disagree that
they demonstrate for your preference. Smalltalker's experience disagrees, which
too is fine. Both are opinions. :)

Both sides can argue for nativeEnglish, descriptive_names, etc.
Plenty of experience on both sides regarding the above. Thus, it reduces it
primarily to personal preferences and opinions.

Smalltalk itself is a testimony it isn't just young programmers who prefer
mixedCase. I am not a 65 year old programmer but I do post a significant and
historical counter example. (Nor am I a kid.)

As I am a Smalltalk (Squeak) fan I tend to prefer mixedCase. But I would not
(do_not) have any problem with wide_names.

So far outside of preference, the biggest argument I've seen in this discussion
regarding wide_names is OS handling of file_names or modules. Smalltalk has the
distinct advantage of living in its own world (image). As such its development
of Classes and Objects live inside its own image and not on the file system.

Python on the other hand is file based and does have to deal more with OS
limitations and file_names. Whether or not that is truly much of an issue, I can
not say.

Nevertheless, I'll defer to the language designers and implementors.

Jimmie Houchin



More information about the Python-list mailing list