why python annoys me

Remco Gerlich scarblac at pino.selwerd.nl
Wed Apr 18 02:08:38 EDT 2001


Luke <floods at netplus.net> wrote in comp.lang.python:
> Python is an ugly language...
> 
> Why should you have to name stuff with __*__ to get some pseudo hiding?
> Or for any reason for that matter...
> 
> Why do you always have to access class data members as self.* What a
> pain in the ass, and anti-OO.

I can see how it makes you type more, but why is it anti-OO?
Which of the principles of encapsulation, data abstraction, polymorphism or
inheritance does it violate?

> In a Java class, you don't constantly
> have to write this.feature = this.feature2 ++; if this.a > this.b etc...
> How tedious that would be, and is with Python's self.

But then again, there are several companies that have a C++ or Java coding
style that does mandate use of "this". Because the code becomes a unholy
mess if you don't.

> Is it procedural or OO?  Some of the std lib seems to think it is OO,
> and the other half seems to think it is procedural...

Since when are the two mutually exclusive? All of that procedural Python is
function objects in module objects...

> I mean sometimes
> you create a new object with new, other times you just get a reference
> by calling a function.  Even Java is more object oriented than this--you
> *only* write classes, and the standard library is *only* made of
> objects.

That's "class oriented". Isn't it stupid to implement all the standard math
functions as a load of static methods on one Math class? What's OO about
that? What data is being hidden? And the functions themselves aren't even
proper objects...

> Furthermore, the syntax and features of the language keep changing with
> every release.  For God's sake!  I regret ever buying programming python
> and learning python... I feel like they're already out of date.

They're years old. Python 1.5.2 was years old. Since then there has been a
syntax change (list comprehensions), a semantics change (nested scopes since
2.1), and string methods, which are enhancements to an existing type. Oh,
and print >>. The rest of the changes were much smaller.
As if Java didn't change loads since 1.0...

> There are lots of nice things about python like its built in [] and {}
> and I really like the indention, but I'm about to go back to Java, a
> language I know very well and feel comfortable in.  I'm not slamming it,
> it has lots of potential, but there are so many stupid illogical
> features in Python that just ruin the whole experience.

That's absolutely fine, use the language that suits you best. But I don't
agree with you on the comments above...

If this was a troll, it worked pretty well.

-- 
Remco Gerlich



More information about the Python-list mailing list