Explicit Frustration of the Self

Erik Max Francis max at alcyone.com
Mon Jan 6 01:11:41 EST 2003


"Delaney, Timothy" wrote:

> Strangely enough (to you), I consider it one of the best features of
> Python.
> I have spent an inordinate amount of time trying to convince people to
> always use 'this' in Java and C++ on instance variables and methods.

I have to agree.  Right from the start of using Python (as an
experienced C++ programmer), I respected the existence of the explicit
self arguments and qualifications, and did not detract from them one
bit.

Besides, many C++ and Java programmers use something similar to
Hungarian notation* to set off identifiers that are members/fields in
classes, instead of just using `this->'.  Having to always qualify self
in Python just makes that automatic and required.

. 

* Again, I write "something similar to" simply to avoid the debacle of
whether it technically is or not.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ I'll have to get over this sooner or later.  Why not now?
\__/ Louis Wu
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.




More information about the Python-list mailing list