What's in a name?

Mike Steed MSteed at altiris.com
Wed May 24 15:23:57 EDT 2000


> From: Edward S. Vinyard [mailto:vinyard at arlut.utexas.edu]
> Sent: Wednesday, May 24, 2000 12:59 PM
> To: python-list at python.org
> Subject: Re: What's in a name?
> 
> 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.

Hey I know, we could enforce Hungarian notation in the parser!

Okay, I'm kidding, no flames please.  For the record, I detest Hungarian
notation.

> Ed

--
M.




More information about the Python-list mailing list