What's in a name?

Edward S. Vinyard vinyard at arlut.utexas.edu
Wed May 24 14:59:29 EDT 2000


On 24 May 2000, Gordon McMillan wrote:
>Edward S. Vinyard <vinyard at arlut.utexas.edu> wrote:
>>In some instances, case sensitive languages are exploited:
>>
>>1. Case can add semantic information to the names of classes,
>>   functions, and instances.  
>>
>>2. Case can be used to delimit multi-word names.  An example:
>>   spam_counter vs. spamCounter.
>
>Certainly. These are conventions that Python (being case sensitive) 
>allows. I like them.
>
>But you have to learn to recognize the conventions. That is, in the 
>context of Python I recognize spamServer as different from 
>SpamServer. (Personally, I would expect the first to be a function 
>and the latter to be a class, but if the author uses different 
>conventions, it won't take me long to figure it out.)

These (and others) are (syntactic or semantic) distinctions that we choose
to make visual by exploiting the case-sensitivity of Python. I enjoy the
visual distinction that they provide, but why should we have to figure it
out at all?  If such distinctions were represented visually in a standard
way (with or without the use of capitalization) we would accomplish
several things.

1. Remove a (potential) hurdle for new programmers.

2. Eliminate the (however insignificant) portion of time an experienced
   programmer spends deducing the convention that a module uses.

3. (Maybe!) Alleviate concern about Python's case-sensitivity.

Ed




More information about the Python-list mailing list