why python annoys me

Christopher Barber cbarber at curl.com
Tue Apr 17 19:11:08 EDT 2001


>>>>> ">" == Luke  <floods at netplus.net> writes:

 >> Why do you always have to access class data members as self.* What a pain
 >> in the ass, and anti-OO. 

In what way is this "anti-OO"?  I think it makes the code clearer.  In C++ and
Java it is easy to get confused about whether a variable is global, local or
belongs to the class and consequently people feel compelled to come up with
various naming conventions to avoid the confusion.  Some C++ shops even
recommend using 'this' for all member accesses for clarity!

 >> Is it procedural or OO? 

Both.  I think this is good, not bad.

 >> Even Java is more object oriented than this--you
 >> *only* write classes, and the standard library is *only* made of objects.

Sure, if you ignore "static".  The fact is that Java does have functions, it
just forces you to put them into a class's namespace.  There is nothing
particularly object-oriented about that.

 >> Furthermore, the syntax and features of the language keep changing with
 >> every release.

That is a valid complaint, but then one could also complain that highly
standardized languages like C++ and Java change much too slowly.  

- Christopher




More information about the Python-list mailing list