TIOBE Declares Python the Programming Language of 2007 166
The TIOBE Programming Community Index has declared Python as the Programming Language of 2007 due to a 58% surge in its popularity rating during the year, making it now the sixth most popular programming language and finally surpassing Perl. They also assert that Python has become the "defacto glue language," being "especially beloved by system administrators and build managers."
Re:Hmmm (Score:4, Interesting)
What's up with all the PHP haters on Slashdot? For building most web applications it's the place to be. Zend is working hard to increase the level of professionalism of the PHP community. I've recently started using Zend Framework [zend.com] and it's a really nice way to build web applications.
Re:Maybe we will see more Web (Score:3, Interesting)
Every task has a language/framework to fit it (Score:5, Interesting)
Them's fightin' words, sir!
But seriously.... I've just gotten so tired of PHP in the past two years, and Ruby was such a great improvement to it. I used Python before PHP and my only complaint at the time was that it really was more trouble than it was worth at the time to write whole web applications in Python. You could, but languages like PHP were made for the web, so it got superseded. Once upon a time I wrote a few games in Python using PyGame and PyOpenGL though and had nothing but great experiences with that. I wouldn't call Ruby a cure-all, but it's pretty flexible and really pleasant to use for a wide variety of projects.
That being said, I think that your post really misses the fact that for every task there's usually one or two programming languages or frameworks that would be "best" for that task. While PHP and Java may work as a backend for you, many of my projects are almost completely perfect for a Ruby on Rails implementation or specifically require functionality that exists nowhere else. Meanwhile Actionscript implies Flash, and I only have a couple of things brewing right now where Flash is even an option, much less advisable. I'm not trying to slam you here; I'm just saying that like anything else your mileage may vary.
Also, python's supposedly getting tail recursion and some other tasty features soon. I might be tempted to pick it back up if it can surpass ruby in its efficiency that way.
Build management: Switching from gmake to Python (Score:5, Interesting)
Absolutely. This year we replaced an old build system written in make with a (vastly superior) Python solution written from scratch. The replacement took one programmer about two weeks. The make system had taken two programmers a disgusting amount of time to build and support. What suprised me most upon completing the changeover was that the Python solution was faster than the gmake solution; since Python compiles to bytecode, re-running the build script was a quicker operation than gmake's re-parsing of the make files.
Python's advantage as build glue is that it is just simple enough to be nearly shell scripting (write a simple wrapper, and you can pretty much just write shell script). But it has the features of a decent high-level language---including, most importantly, integrated documentation and a debugger. Anyone who doesn't understand why one would need a debugger for a build system hasn't yet written a build system complicated enough.
Really though, this is less a statement in support of Python and more a statement against gmake. Make's age really shows as a build language, and if not for all the tools in the GNU world that depend upon / assume the existence of a make engine, I would encourage everyone to just toss the whole thing overboard and create all new build scripts in something else. You have better things to do with your time than reverse engineer code written in a nearly incomprehensible string-parsing language by someone who---in spite of the "standards" that have built up around make over the years---has gone off and done his own thing anyway. If you're going to have to deal with custom build code, you may as well own the challenge completely.
Re:Maybe we will see more Web (Score:5, Interesting)
I had some features I had estimated out in PHP (over the last 6 months my estimates have been pretty dang close), and I implemented several of them in Django/python instead. I averaged beating my PHP estimate by 1/3rd, and that's including the time I spent trying to learn how the heck to do things in Django. I can't wait to see how things look once I've got at least an intermediate understanding of my framework. I don't hate PHP, I just love python much more.
tools for the task (Score:4, Interesting)
First off, let me say that I love both Perl 5 and Python 2.x and have used each of them on a wide diversity of projects. I've implemented my own OO system on top of each, I've used each for CGI, I've used each for AI, natural language processing, and game programming. Both languages have their idiosyncratic idioms and it's really annoying when you see a lot of C-ish code in either Perl or Python projects. It's also very possible to write ugly "write once" code in either one, don't be misled by the whitespace arguments: ugly code is about how you express (or fail to express) a problem and a solution.
However, I have to say, pick the tool for the job. There are things that are more naturally expressed in Perl idioms than in Python idioms. There are things that are much more clear and direct about Python code for outsiders to read and understand. If I were doing a ton of regex text scanning work, Perl incorporates it into the language directly, whereas it's a bolt-on for most other languages. If I were doing a ton of object management, I like the compactness of Python's syntax over that of Perl's. Both have great extensibility but the available extensions and support can shape your choice for a given project. I wish Python had true equivalents to Perlmonks and CPAN; conversely I wish CPAN modules were more crisp and consistent, attributes I think I find in the community-written Python modules I've used.
Re:Lies, damned lies, and statistics (Score:5, Interesting)
The last time I had free rein in something like that, I did just that, and made a clean rewrite to make a few cleanly commented, consistent Python modules that did the work of all the previous scripts, sans bugs. Just the fact that assignment by reference is the default, that building data structures deeply requires no line noise, makes the program design easy to get right the first time. No "oops, need another dollar sign there". No "how do I refer to a value in a hash of lists of hashes again?" You just do it.
Maybe it's that my sense of programming comes from years of looking at some of the cleaner C and C++ out there, and reading Design Patterns, makes me prefer a language that encourages design and clean coding practices by default. I don't want to deal with one more script from someone who munged strings of data with regular expressions where they should have used data structures or objects. Those of you who are about to clean up piles of Perl code with Perl Medic in hand, I salute you. You're braver than I care to be anymore.
Just Say No! (Score:3, Interesting)
...any language where the author thinks lambda is "too confusing" and should be removed is doomed from the start.
Re:Maybe we will see more Web (Score:4, Interesting)
Perhaps you learned something the first time you solved the problem which helps you solve the same problem quicker the second time? Perhaps if you redid the project in PHP (I know this would be pointless, but for sake of argument) it would be just as fast as in Python?
Re:Build management: Switching from gmake to Pytho (Score:2, Interesting)
Apparently some people even have it as their CLI of choice, so I may be missing something, but I've been unable to pry out of them what the secret is.
Re:Lies, damned lies, and statistics (Score:3, Interesting)
http://www.langpop.com/ [langpop.com]
Hopefully, I'll have trend data up there soon as well.