What's in a name?

Gordon McMillan gmcm at hypernet.com
Wed May 24 13:56:35 EDT 2000


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.)

That's because, in the context of Python, I've trained myself to pay 
attention to case.

In the context of email, I've trained myself to ignore case (else I'd 
never parse an effbot posting).

In the context of the Windows filesystem, I ignore case. And then 
suffer (briefly) when I go to *nix and have to pay attention.

For a newbie, the context is unfamiliar and they have no grasp of 
the conventions. There's liitle similarity to written language rules of 
capitalization, (why are classes proper nouns, but not instances?).

So I'm all in favor of tools with training wheels. Once a newbie has 
learned to pay attention to case, they can take off the training 
wheels.

- Gordon




More information about the Python-list mailing list