Why self?

kosh at aesaeion.com kosh at aesaeion.com
Tue Jul 9 14:17:46 EDT 2002


On Tue, 9 Jul 2002, Mark McEahern wrote:

> You say that lots of people would like to lose the requirement.  My guess is
> that's not true.  It may appear true, since this topic does come up every so
> often and the people who think it's a problem are often quite insistent
> about it.
>
> What you don't see, of course, is all the people who are silent because
> they're quite happy with self. prefixes and consider this a pointless
> discussion usually kept alive by people who refuse to learn the idioms of
> Python to their best advantage.
>

I have to agree with you on this. I find self makes the code very clear
and much easier to maintain. Overall I am willing to use extra keystrokes
to make maintenance easier since I tend to go back over a piece of code
far more often then the first time I wrote it and having it simpler to
read is really useful.

Python already takes far fewer lines of code to express the same intent as
most other languages why remove that even further when it then loses
legibility. That seems like a waste to me. You might as well propose
strange symbols for self which I think is also a bad idea then python
would end up just looking like the line noise that some other langauges
often look like.

I welcome changes to python that increase it expressiveness, ease of
reading, speed, reliability etc however making stuff shorter to type just
to save some keystrokes is not a change I endorse.






More information about the Python-list mailing list