Just borrowed the book from the library and reading it at moment...
When the idea of Rankk was conceived, I didn't have the luxury of time to read that much about Python. I remember skimming through a couple of chapters of some Python book to get a general feel of its syntax and then plunging into the coding as I couldn't wait to get started.
There was quite a bit of figuring out at the beginning - things like how to iterate over lists, dictionaries, etc. The indentation required a bit of getting used to too, but it has become pretty natural now.
Compared to Perl, the learning curve for Python is probably less steep. Perl has references and deferencing which are additional concepts to grasp but Python has none of those and things work just fine.
Also, I find it easier to manipulate lists and dictionaries in Python. Both use the square brackets [] for accessing. In Perl, lists (arrays) are subscripted by [] while dictionaries (hashes) by {}. Additionally, an array variable is prefixed by @ and a hash variable by %.
But of course, there're areas where the snake loses its power and ease of use to Perl the camel. Whenever I've to do some regex, I find myself going back to Perl.
Also, Perl has no lack of modules which are readily available from a central location - cpan. Not so with Python. I remember Bio and I had to do a lot of googling to find the modules we needed.
But overall, in terms of code readability and learning curve, Python wins.
If I've to code a new site now, Python will be considered among the options. Before, it was either Perl or PHP.
Any thoughts to share?
Last edited on 2007-04-26 23:41:13 by Pha. Sphinx