Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm genuinely curious - why are programmers still using Perl instead of Python?


Some people actually find Perl fits the way they think better than Python does. They may find the culture a better fit, or they're better able to find existing solutions, or they simply prefer the concept of "There's more than one way to do it" over "There should be one – and preferably only one – obvious way to do it." Finally some are better paid to write Perl than they are to write Python.

The reality is any/some/all of the reasons above apply to any combination languages in your question. Might as well ask "Why are programmers still using COBOL rather than Erlang?" Because.


CPAN, Unicode, testing, and long term maintainability of the code (Seriously; I can tell the difference between good Perl and bad Perl at a skim. Good Python and bad Python tend to look the same. Truly awful Python is immediately obvious, but that's not an interesting case to consider.)


Why would I use python if I'm well versed in perl?


I work in a group that manages a large amount of Solaris, AIX, and Linux servers, of varying versions.

When I'm writing scripts that can be run on any given system, there are very few things I can use that I know will work. One of those is Perl (5.8.8) and the other is Korn Shell (ksh).


Feeling of being "in the moment" & having maximal individual control (Perl 5) versus long-haul maintainability + potential to be widely collaborative, if perhaps at a slight loss in expressiveness (Python).

Perl 6 being an entirely different beast from either of these two languages, of course.


Really? Python has magic everywhere and requires methods to take self as an argument. Indentation instead of brackets. It's one big hack. Perl is a much nicer language. The real question is, why would I ever use Python over Perl?


What in Python is "magical"? The fact that methods take a "self" argument is a result of it not being magical.


Methods taking "self" as an argument is a dirty hack, ain't no magic there. The language is just pretty ugly. It's got the whole whitespace thing going on, which is forced, and some might think it gives a good aesthetic but that is dust in the wind in terms of help for Python's ease on the eyes. The whole standard namespacing and mix of oop/procedural global functions is just..schizophrenic, the capitalization scheme is dastardly. I haven't seen many languages that look more _basic_ than python. It's a frankenstein of Perl/Ruby and Basic. Forced verbosity is egh.

Here's your magic methods and properties: http://www.rafekettler.com/magicmethods.html

Those magic methods kind of remind me of clever hacks while coding in PHP.


Magic methods have always been my favourite part of python, they're the developers way of ensuring we can do anything that they can do, if there isn't a magic method for it, it's not possible. We can create our own version of anything in the standard library.

Self is one of those things, if you wanted to you could easily add another instance variable, just implement getattr and have it return a partial function. Although I will admit it is one area which does cause more than its fair share of errors, but I prefer it to Ruby's methodology.


Are the magic methods API frozen?


Most "high-level language" programmers disagree with you, including myself.


Speak for yourself. I know about every programming language, high, low, down to assembly. Your ad-homonem attack is so silly considering that you aren't talking to a scripter or web guy. I'm a generalist and Python is one of my least favorites. It has hardly any redeeming qualities other than Django, NumPy library and CPython's speed.


What the heck did you just freaking say about me, you little weenie? I’ll have you know I graduated top of my class in the MIT, and I’ve been involved in numerous secret research projects on exokernels, and I have over 300 confirmed reward checks from Knuth. I am trained in gorilla cryptography and I’m the top Cyber Command hacker in the entire US armed forces.


A canonical synopsis of the typical HN language "debate."



Python ... requires methods to take self as an argument.

Unlike... Perl?


Yeah, a silly criticism of Python versus Perl. Perl borrowed Python's mediocre object system and made the syntax a little worse. Fortunately Moose made both the object system and the syntax a lot better (but Perl 5 was out for a decade before Moose arrived).


Why not? I can't think of a serious reason to favor one over the other between any of Ruby, Perl, and Python.

A lot of people find Python's scope rules annoying.

I've heard Perl has the best unicode support.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: