Sunday, August 15, 2010

Am I a Python fanatic now?

I find myself using Python for all kinds of stuff. I have written an app for my N900 in python, I am working on websites using Django, and I have even played with some of the puzzles on Project Euler in Python.

Python is a great language. I can do most everything I do in Java, an the performance seems to be generally as good. Some things are a whole lot easier, though I also find that it is easier to be a little sloppier (for example, I miss the ability to easily create interfaces and mock objects and dependency injection, though you CAN do those things in Python if you try a little harder). Java forces me to do things more formally and strictly, but Python lets me do things more quickly and easily. And once you write the program, you don't have to create a whole framework to compile and run it like you do in Java.

As for Django—it is really excellent. You can get started so easily, and the built in development server is great. The fact that everything is done in python, not with cryptic and static XML files allows me to hack away at whatever I like. But this is a topic for another post...

A few gripes: some of the language is quirky and perl-ish, which I don't like (for instance some string functions). The tabs vs. spaces for indenting is a nuisance--switching editors can cause an hour of fixing tabs or spaces. And I can't get used to using None instead of null. But I am getting used to adding self to my class methods and class-level variables, which I would have complained about before.

When it comes right down to it, I find I would rather use Python than Java (which are probably my two major choices right now).

No comments:

Post a Comment