Self Nanny
Gaetan Corneau
corg at copernic.com
Mon Mar 6 11:47:18 EST 2000
Clarence,
> I wonder if you have actual evidence of that point.
I do. But as Grant Edwards noted, I'm talking about C++ programmers who want
to use Python.
> One of my biggest
> problems with C++ is the inability to distinguish between an
> attribute and a local variable at a glance.
I have been using C++ for a long time (too long?), and I don't remember
having faced this problem myself, but I know it is possible. To make sure
new C++ programmers don't have problems with that, we have a little naming
convention.
> I would guess C++ newbies have as many
> problems. Especially when they get into the situations where
> they have to start explicitly using 'this'.
Yes, C++ is complicated. The "this" pointer subject is a difficult one for
new programmers.
But I don't want to discuss C++, I just want to see Python more widely
accepted :)
> In fact, in a posting in this newsgroup a while back, someone
> said they actually have a standard practice of *always* referring to
> attributes via *this, just to avoid the confusion and inconsistency.
Ouch!
> Three years ago, as a long-time programmer but brand new to Python, I
> applauded the Python approach.
I don't discuss your preferences. *Personally*, I find the declaration AND
use of "self" annoying in a language I use for rapid
development/prototyping.
Would programmers who have a background in a language other than C++ really
miss "self" in the method declarations? I would be interested to see what
Python programmers in general think of that. You know, I don't care much
personally, since I have been using Python long enough to have developed the
"self declaration reflex" :)
______________________________________________________
Gaetan Corneau
Software Developer
Copernic Technologies inc.
http://www.copernic.com
E-mail: corg at copernic.com
______________________________________________________
"Tu l'as trop écrasé, César, ce Port Salut"
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/B/MU d- s+:++ a C++
UL+ P--- W+ N- K- W++ t--
!5 X- R+ tv-- b++ DI++
G e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
More information about the Python-list
mailing list