Completely Subjective Reasons I Prefer Perl to Python

chromatic on 2007-09-13T00:25:09

On p.r.c, sverrejoh asked Why do you prefer Perl the language over Python the language? My completely subjective and personal answer for me and me alone there seemed worthwhile to repost.

I find Perl much more expressive. Perhaps it's that as I've watched Python develop, I've seen more and more of the Python best practices converge toward a single development style (heavy on Pythonic OO), where Perl has deliberate support for custom individual or shop styles.

I don't think it's bad that Python tends toward a single and identifiable Pythonic style; it's very much within the language philosophy.

I don't think it's necessarily good to encourage multiple paradigms in a language or platform. It's useful if they integrate well.

I like Perl because I think it has sufficient expressiveness and abstraction while supporting different development paradigms (functional, imperative, several types of object-oriented) without forcing any one and making the others feel unnatural (whether technically or culturally). When I write Perl, I feel like I get to choose the most appropriate style of development. When I write Python, I feel like the language and libraries suggest very strongly that my code conform to their ideas.

That's pretty subject, I admit--and I also admit that there's plenty of code on the CPAN that enforces certain styles. Sometimes that's for good reasons (SAX processing) and other times it isn't.

I suppose I feel similarly about Mac OS X versus GNU/Linux.


Having just read the thread ...

duff on 2007-09-13T13:56:19

I get a reinforced impression that when people say "python is more readable than perl", they are really trying to say that "alphanumeric characters are more readable than non-alphanumeric characters".

Re:Having just read the thread ...

chromatic on 2007-09-13T17:59:31

Several hundred million people whose native languages have ideographic, not phonetic, representations might disagree.

Re:Having just read the thread ...

pudge on 2007-09-13T19:52:04

This is also why I don't like gravatars! ;-)