Why do people dislike Perl?
Unfortunately, I have to say I agree with most of the comments. I think the assumption “Perl has a reputation for being line noise due to golf/obfu” is false. In fact, I’ve actually occasionally heard people say “I don’t really like Perl, but the obfu is cool”.
I can think of 3 reasons why people might dislike Perl that I think would account for a much greater percentage than those who were led astray due to seeing obfu/golf (although this is obviously a very subjective and speculative discussion):
- They’ve had to maintain poorly written Perl code. There’s plenty of it around. From this, people draw the conclusion “Perl leads to unmaintainable code”. It’s not rational, but I’ve seen a lot of people say this (both at work, and online)
- They haven’t really used Perl a lot, but they’ve heard bad things about it. This can be especially true if these people see Perl as a direct competitor to their language of choice. They seem to think that by bashing Perl, it somehow makes their language better. An immature attitude, of course, but it does exist.
- They’ve used Perl, and may not have had a particularly bad experience with it in terms of other people’s code, but they just didn’t like it. It didn’t fit their way of thinking. Maybe it didn’t provide the safety nets they’re used to. So they decide it’s Perl’s fault. A natural enough conclusion – I kind of think Java sucks, but that’s probably because it really doesn’t fit my way of thinking. Plenty of other people seem to be happy with it.
All three of these reasons for not liking Perl could easily manifest themselves as “Perl is line noise” comments. (As an aside, if you google “Perl is line noise”, you don’t get a hell of a lot. Maybe this meme isn’t as pervasive as we think).
An interesting thing to note: of those three things above, there’s not a lot we can do about any of them directly (except maybe the first one). Moreover, maybe we should ask: “Do we want to do anything?”. Perhaps we should look at the types of criticisms we can (and possibly should) do something about, like those chromatic recently pointed out. These are direct and precise criticisms of Perl itself: the reference syntax, function arguments, exception handling, etc. Not personal preference, or vague and general comments.
I don’t think we can worry about people getting led astray for trivial reasons. Or reasons beyond our control. We’ll waste a lot of time worrying, and end up throwing away parts of Perl (and the culture) that make it cool.