Basic inheritance question
Bjoern Schliessmann
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Jan 16 09:23:14 EST 2008
Lie wrote:
> 42.desthuilli... at wtf.websiteburo.oops.com> wrote:
>> I used to systematically use it - like I've always systematically
>> used 'this' in C++ and Java.
>
> And that is what reduces readability.
IMHO not, IOPHO not. This is the nth time (n >> 1) this discussion
comes up here. If I have learned one thing from those very lengthy
discussions, it's that Python's "self" handling is not going to
change.
> A proficient VB/C/Java programmer would frown upon the extra,
> unneeded garbage as they thought it was clear already that the
> variable refers to a class-level variable.
C programmers surely have no opinion concerning C because it has no
native classes.
Personally, I've seen many C++ programs with complex class designs
where it definitely helps to consistently use "this->". I cannot
remember all local (and global) variables in bigger methods.
> There is one major positive point: convenience and shorter code.
> (isn't that two?)
Shorter code is not per se positive, neither is it convenient. If it
was, everyone would use perl.
Regards,
Björn
--
BOFH excuse #109:
The electricity substation in the car park blew up.
More information about the Python-list
mailing list