Thursday, January 6, 2011

Perl Vs Python

Perl is really a pearl of a language. I have used it since my first year summer for my summer project to develop a website for insti using it extensively for both backend and frontend.
I have been using python scripts too, for Openflow platform and some simple tasks. I have always been biased towards Perl as a better language, but today I must say, Python has an edge.
One thing that I have personally realized is the OOPs concept implemented in both the languages. In Perl, it was introduced late as the language was not designed for it. I had hard time for writing modules in Perl and creating classes using *bless* and never felt blessed.
I think Python is easier. Besides there are a number of libraries and active community for Python than Perl. Perl once notoriously famous for its jaws regex and weird syntax, and the usual bragging that comes about by saying " there is more than one way to do it !" is loosing its popularity(i doubt how much it was before, because of the reasons stated above).
I have found it hard to compare the two in the past for couple of years, but now ...
definitely, python is as good as perl in my opinion :) [I am still a little biased towards perl]

1 comment:

Anirudh Sivaraman said...

I guess you posted this long ago, but this post struck me as very relevant. I started using Python around 3 4 months back and I think it's really intuitive. Besides, it enforces good coding practices out syntactically. For one, for loops and if blocks are naturally indented. You also can't use before you define. These are things which people are taught in a coding class, but Python naturally makes it part of the language.

Also, I think compared to PERL there aren't different notations for hashes, arrays and variables and the library support as you pointed out is way more. Yeah, as we move into a time where more people want to code and code quickly maybe "there is only one way to do it" is a better paradigm.