News for hackers. Stuff that matters.
Re:Python's super considered harmful by dagw on Tuesday December 28, 2010 @07:46AM (#2045319)
Well I'm mainly a python programmer and a fan of the language (but refuse to use the word "pythonista" and believe that whoever coined that word deserves a punch in the face) so take what I say with an appropriate grain of salt.

Yes python has a few warts you need to aware, and when you list then they sound quite overwhelming, but having programmed in python for, on and off, 10 years, very few of them have actually tripped me up in any serious way.

The GIL for example gets talked about more than it actually causes problems (and there are python implementations that don't have the GIL if it is truly a problem). If I really need multiprocessing within python, the multiprocessing library normally solves my problem.

The string formatting "problem" you link to is hardly a problem at all in python 2. The "%s" % (foo) approach didn't stopped working after 2.4. They simply added a way to deal with non-positional arguments. That being said I'm not really a fan of the new python3 print syntax, but maybe I'll eventually get used to it.

as for the 2.x/3.x thing, yea I'll agree it's sub-optimal. Let's just say I still write all my python code using 2.x since most of the libraries I use still don't have stable (or any) 3.x versions.

The version issue you link to is problem of forwards compatibility rather than backwards compatibility and many languages fail at forwards compatibility. As far as I know there has only been one backwards compatibility break in python2, and that was that 'with' became a keyword.

Some syntax inconsistency is annoying I agree, but they're mostly there for backwards compatibility, and many have already been fixed. Hopefully they've gotten it mostly cleaned up in python 3.

The other issues you link to seem to be mix of personal opinion and minor annoyances.

Sure the scope rules are a bit odd a times, but I've never really had problems with them in actual real code.

I really don't get the complaint about lack of information hiding. Yes python doesn't have "real" information hiding, but you can get most of the useful parts of information hiding by adding underscore to start of your variables and method names.

The only point on that list that I actually agree with to any extent, is the lambdas/anonymous functions, complaint. But again, it is a minor annoyance rather than a major deal breaker.

At the end of the day, I agree that there are a lot of odd corners in Python that have arisen from how the language has grown organically over the years, and yes there are 'cleaner' languages out there (although I'm not sure Ruby is one of them). But for when it comes to getting things done in a quick, clean and efficient manner, python just works for me.

There are no comments on this comment yet.