
Perl: Love it, or hate it, but don't ignore it - fogus
http://blog.newint.org/tech/2009/11/26/perl-dont-ingore-it/
======
mechanical_fish
The phrase "love me, or hate me, but don't ignore me" is a serious marketing
mistake, in any context. It's a transparently selfish cry for attention.
Rather than offering something great to the audience, you're trying to win
pity points by subtly accusing them of poor judgement: You should be paying
attention to X, but you aren't!

Believe me, if people wanted to pay attention to your project, they would find
a way to do so. And if your project is being politely but firmly ignored, and
you're not getting the message, it is not the audience's problem. They've
responded to your message. That response is somehow not getting through to
you.

Perl needs no more criticism. Even the criticism of Perl is old news. Yegge's
essay, cited elsewhere on this thread, is five years old. I suspect he has
little to add to it, and neither do I. I'm glad Perl's users are happy and
productive, I was really grateful for it ten years ago, and I have seen
nothing that makes me regret my decision to stop using it.

~~~
jrockway
_The phrase "love me, or hate me, but don't ignore me" is a serious marketing
mistake, in any context._

OK, but don't think that one blog is the voice of the Perl community. One blog
shows the opinion of one blogger; nothing more. Amazingly, "the Perl
community" does not have one single voice, as it consists of tens of thousands
of people all over the world.

(Also, if blog noise was a good measure of langauge popularity, it would be
clear that the most popular programming language right now is Go.)

 _Believe me, if people wanted to pay attention to your project, they would
find a way to do so. And if your project is being politely but firmly ignored,
and you're not getting the message, it is not the audience's problem. They've
responded to your message. That response is somehow not getting through to
you._

One thing I've learned from social news sites is that this is not correct.
People mostly want to find ways to justify their insecurities. If they don't
know very much about programming, but pick language X, they will hang around
people that like language X and that say good things about language X. Then
they feel smart by association, and since they have lots of friends saying
lots of good things about language X, they can feel good for "making the right
decision". Being down on language Y and language Z also help reinforce that
feeling. If language X is unpopular, then they're clearly in the so-much-
smarter-than-everyone-else majority. If language X is popular, then it's clear
that it's the best. If it weren't good, why would it have so many users?

And so on.

These are not technical arguments, they are just emotion. Confusing them with
technical arguments is quite silly.

 _Yegge's essay, cited elsewhere on this thread, is five years old. I suspect
he has little to add to it, and neither do I._

It's worth noting that Perl has changed _significantly_ in five years. All of
that criticism has resulted in many major changes in how people use Perl, such
that the criticism is probably no longer valid.

But of course, people like to recycle that criticism because They Picked
Something Else, and drunken rants from five years ago make them believe that
Something Else is the right choice.

(I am not sure how valid it was five years ago, actually. It was more a
criticism of Amazon's hiring practices, or perhaps a note about how poorly
managed the programmers were. I would love to write an essay about how bad
Python is, because I have seen some absolutely horrible Python code... but I
realize that it's bad because it was written by someone who didn't know how to
program, not because Python is intrinsically bad.)

------
mock
Please stop using Perl.

Perl has been my startups' secret weapon, and I'd rather the competition
didn't know about it. Perl let us deal with large volumes of data, at high
throughput (there are several ISPs, Universities, and fortune 500 which use
our product to protect their mail infrastructure from DDoS and Spam). At a
former company it let us collect, parse, store, audit, and make predictions
against millions of web hits per day, in close to real time, with cheap
infrastructure. Perl has been solidly stable - it just runs - keeping our
ecommerce infrastructure making money.

It has had few security issues over the years. It has had few backwards
incompatibilities between versions over the years. As a component of our
products, it's given me relatively little pain in performance, reliability and
security. Development wise, I can't count the amount of time we've saved over
the years thanks to not having to reimplement something because it's on CPAN,
with a sensible license, with doumentation, tests, and in an easy to find and
search location. As for code quality, Perl has great support for testing,
support for automating code review (Perl::Critic), and a community of
developers that are constantly making things better - but without breaking
things that worked in the past (Moose has done amazing things for refactoring
ugly OOP code, and you can use it with any of the other older OOP stuff).

I use it because it works well, seldom breaks, and causes me less hassle than
anything else I've tried (C, Java, Python, PHP, Ruby). I've spent serious time
with this language; I've maintained ugly old code from 10 years ago, and giant
million++ line projects written in it. It has warts, sure, but what doesn't? I
don't care; it's reliable. Big jobs, little jobs - it gets the job done. And
that, to me, is more important than high minded ideals about aesthetics and
purity.

~~~
known
Almost all Wall Street firms code in Perl including my favorite
<http://www.moneybookers.com/app/>

~~~
wheels
Is that Wall Street on the Thames?

 _Registered in England and Wales under Company No 4260907. Registered office:
Welken House, 10-11 Charterhouse Square, London, EC1M 6EH._

~~~
known
Sorry for my bad English. I meant

    
    
        Wall Street Firms + http://www.moneybookers.com/ (my favorite payment processing vendor)

------
jrockway
This thread gives me serious deja vu. It seems like every time someone says
they like Perl, the exact same arguments usually show up in duplicate. Someone
posts Yegge's "I hate Perl" article. Three or four clever souls post something
like, "I ditched Perl 100 years ago and never looked back". Then chromatic
comes along and says something not-negative about Perl, and someone else asks
him for conclusive proof.

Anyway, I can't find words intense enough to describe how I am feeling right
now, but it seriously disturbs me. It feels like the Universe is recursing on
itself, and I am in two of the Universes at the same time. I had to check the
date on the comment three times before I believed that it was real. Then I had
to do some tests to make sure I was not dreaming. I can't breathe under water
right now, so I figure I must be awake. But I can't believe it. This. Again.

~~~
paulbaumgart
I agree that a lot of Perl bashing is thoughtless. And ideology when it comes
to programming languages is just stupid.

I'm sure there are plenty of cases where Perl is the best tool for the job. I
know it's very good for large quantities of string parsing, for one.

You seem to know a thing or three about Perl- do you have advice on other
cases where it's the best tool to use? I think that might be the most
effective form of countering the arguments you dislike, and it would be very
practically useful too.

~~~
jrockway
I think I have too much to say about this for a HN comment, but I will try to
condense.

Perl is okay for parsers; but I think other languages have better parsing
libraries and other languages run faster. I tend to prefer Haskell these days.
It runs quickly, it has good libraries, and it's easy to get it right. (Most
of the stuff I have been paid to write is Perl, though. It does get the job
done, and it's certainly easier to get right than C or C++.)

Where I think Perl is really really great, though, is for building large
applications. Applications are often a lot of pieces that need to be glued
together, and this is were being a "glue language" really shines. The
"language", of course, is CPAN. There is a library that gives you a good
abstraction over almost any task you would ever need to perform.

If you are writing a large application, you don't want to have to implement
boring things like HTTP header parsers or HTML templating engines. You want to
write _your application_. Perl lets you do this to whatever extent you like;
you can have libraries that make all the choices for you, or you can write
everything yourself. (Most people choose some combination of this.) The
language itself is fine for this, and the libraries support it. (One time, I
wrote a web application without a web framework -- but I used many parts of
other web frameworks from the CPAN. So even though I was writing something
fairly obvious from scratch; I could still use libraries for the parts I
didn't really care about doing My Way.)

I know people are going to say, "well, my language has a library for xxx", but
they are kind of missing the point. CPAN has really good libraries for popular
tasks, and At Least Has Something for relatively unpopular tasks. But it also
has libraries for things other than "tasks"; you can change Perl itself with
libraries, and there are libraries for very small programming problems.
(Things that you probably wouldn't think you need a library for, like finding
the largest element of a list.)

It is just hard to explain this to people that haven't used Perl. They think
the only library they will ever need is Ruby on Rails, but there is so much
more to library use than huge frameworks.

Anyway...

Perl also makes metaprogramming very easy. This means I can quickly implement
some abstraction that's higher-level than "raw Perl", and then implement my
application in terms of that abstraction. This makes the application code
easier to read and understand, and it makes the application easier to write.
As I hinted at above, there are a lot of libraries for this; so
metaprogramming isn't some magical thing that only wizards can do -- it's
something accessible to every user of the language that can imagine an
abstraction.

My blog is currently dead (due to my general disinterest in system
administration)... but I wrote a long article a few weeks ago about the sorts
of abstractions that the Moose object system lets you build. If you care to
read it, I think it's still on the planet.perl.org main page. Search for my
name :)

~~~
yogione
I love CGI, DBI. I can write my own SQL. I don't need an ORM. What modules do
you suggest for developing web apps using Perl. Mason or Template Tool kit or
something else.

------
gcheong
I loved perl for a long time before I started using python and, quite frankly,
I don't intend nor see the need for ever having to use perl again. I respect
perl for what it is and what it has enabled me to do, but when better tools
come along I don't hesitate to move on.

~~~
windsurfer
Perl6 would make you love Perl for being a better tool again ^_^

It has all the features python has over Perl5, except for the syntactical
whitespace strictness. And that's totally subjective.

~~~
Estragon
Python has a killer feature by comparison, actually. It has a living, widely
used implementation.

~~~
mst
So does Perl5. And with a little help from CPAN, the same feature set. In
fact, I'd argue that the Moose metaprotocol is substantially more powerful
than the one available in python - though if there's a python library that
provides the same sort of level of capabilities, I'd love to hear about it -
maybe we can steal some good ideas from them :)

~~~
j_king
Moose is far more powerful than Python's model.

Python seems to think it knows what's best for the programmer.

Perl tends to think the programmer knows what's best for it.

AFAIK there are no packages for Python yet that implement roles, multi-
methods, and the like... yet.

But Perl is already ahead of the curve in this arena.

(I'm one of the rare few apparently who can speak Python and Perl fluently. I
actually like both languages for entirely different reasons.)

------
grayrest
I'd pay more attention to those frameworks if you'd say why they're
interesting. I consider python/ruby/perl to be sibling languages. You only
really need to know one as your primary language and then steal ideas from the
other two. Node is interesting because it solves a problem: efficient long
polling setup in a language I know.

Why Ruby over Perl then? The ruby peoples have great taste in designing mini
languages: e.g. sass is amazing in a why-couldn't-I-think-of-that way so I pay
attention to them. The best thing I know of coming out of the Perl community
is the people (Michael Bayer is my hacking hero for SQLAlchemy).

~~~
mst
SQLAlchemy's nice - wherever DBIx::Class and SQLAlchemy developers are
gathered at the same conference, there will be beer, and there will probably
be cursing other ORMs for not understanding what a database in. Later in the
night, somebody will say "we should all use ActiveRecord instead - because it
unlocks all the power of MyISAM on MySQL 3.23" and then we'll giggle
incoherently for a few minutes before getting another round of drinks in.

SASS is absolutely beautiful. I think Perl5 with Devel::Declare is a better
internal DSL host than ruby though - consider MooseX::Declare - you simply
can't bend the ruby compiler sufficiently to do something like that to my
knowledge (or Piers Cawley and others wouldn't have moved from ruby back to
Perl5, I don't think ...)

------
mhansen
Just adding another data point: Steve Yegge's essay
[<http://steve.yegge.googlepages.com/ancient-languages-perl>] scared me off
trying Perl.

~~~
chromatic
That's a real pity. I like Steve, but his essay demonstrates a severe lack of
understanding of at least two fundamental features of Perl, namely context and
lists.

~~~
gjm11
If you have evidence that it's lack of understanding, rather than lack of
liking (coupled with a snarky, hyperbolic style), perhaps you'd care to
present it?

~~~
chromatic
Here's a simple one: parentheses never create rvalue lists in Perl 5. They
only perform expression grouping.

~~~
viraptor
But that's exactly what he's complaining about: it simply doesn't make sense
that you have to use parentheses, or crazy q// construct to create a list. At
the same time they don't really "create a list", because it's flattened again.
It requires remembering rules again, just like with the contexts. It just
doesn't "make sense".

~~~
chromatic
> ... it simply doesn't make sense...

It does if you bother to _learn_ the language, rather than assuming that it's
a pastiche of whatever features you bothered to osmose from a smörgåsbord of
whichever other languages you might have encountered.

> It just doesn't "make sense".

The notion that a programming language both can and should be completely
intuitive to novices who don't have to bother to learn an arbitrary list of
syntax rules is absurd on its face.

Parentheses _never_ create first-class lists in Perl. They only ever group
expressions and disambiguate precedence.

Parentheses _sometimes_ create first-class lists in Python and Ruby, for
example. They _also_ sometimes group expressions and disambiguate precedence.
If you want an arbitrary set of rules to memorize, look at the languages which
conflate various and orthogonal uses of the same punctuation character.

~~~
viraptor
"Parentheses sometimes create first-class lists in Python"

No, they never do. (don't know about ruby) Square brackets are for that. No
problems with syntax this way.

"They also sometimes group expressions and disambiguate precedence"

But it's obvious: "expr ( [expr ,]* expr)" is a call - always. "(expr)" is for
precedence. "([expr,]+)" is a tuple. Same as in 99% (made up number) of
languages you encounter.

OTOH, in Perl, you've got the same expression that creates a list in one case,
but not in the other, which is simply confusing. To be honest, I don't know of
any other language that does it. You can call my expectations to be
appropriate for a pastiche of whatever other language - yes - all the other
languages I know / heard of, work the way I expected... and don't force me to
learn rules that work based on context. Similarity between languages is a
"good thing".

If you like that syntax, good for you. But I fully understand people who'd
rather not be surprised this way. To me it doesn't make sense to be that
different. I think Steve Yegge knew exactly what () do when he was writing his
blog - he was simply complaining about that unexpected behaviour.

~~~
chromatic
Your "obvious" rules are as arbitrary as those of any other language.

What is the difference between a tuple and a list that's "obvious" to a novice
programmer? (Yes, you may claim that I change my argument to talk about lists
versus tuples, but if you want to press on this line of thinking, Python's
syntax for list and list-of-list declaration is the same as Perl's syntax for
anonymous array declaration.)

Which parts of the requirement for a trailing comma after the first element of
a single-element tuple are "obvious" to a novice programmer?

Which of those "obvious" rules are obvious cognates with other programming
languages?

(What's "obvious" about Smalltalk having a strict left-to-right evaluation
order, ignoring "obvious" mathematical precedence rules which schoolchildren
learn?)

> ... in Perl, you've got the same expression that creates a list in one case,
> but not in the other...

This is still not true. The _comma_ operator creates lists in Perl.

------
glyphobet
"Supposedly Perl Web searches are on the rise"

Fact check:

[http://www.google.com/trends?q=perl&ctab=0&geo=all&#...](http://www.google.com/trends?q=perl&ctab=0&geo=all&date=all&sort=0)

Perl has been losing ground, while Python and PHP gain ground, for almost ten
years:

[http://www.ohloh.net/languages/compare?commit=Update&l0=...](http://www.ohloh.net/languages/compare?commit=Update&l0=perl&l1=php&l2=python&l3=ruby&l4=-1&measure=projects&percent=)

~~~
jrockway
If you do Google Trends searches for "perl programming", "ruby programming",
"python programming", and "php programming"; you'll notice that they all show
a downwards trend.

So I think there is something deeper here than "everyone is moving away from
Perl".

~~~
lg
i see what's stealing their thunder...
[http://www.google.com/trends?q=perl+programming%2Cpython+pro...](http://www.google.com/trends?q=perl+programming%2Cpython+programming%2Cruby+programming%2Clisp+programming&ctab=0&geo=all&date=all&sort=0)

------
david927
I avoided Perl up until about six weeks ago, when one of the best coders I
know selected it for something we're working on. If it was anyone else I would
have overruled the choice, but it turns out he was right.

It's an unmitigated disaster of a language, as a whole, but if your needs are
a "scaffolding language" that can script something together quickly and you're
using a lot of regex, I have to admit, it's a great choice.

~~~
mst
It's an unmitigated disaster _if_ you use it wrong - or at least if you use
out of date techniques.

This is also true of C - consider things like scanf and other chunks of stdio
that are preserved for compatibility but no developer in his right mind would
use for new code.

Applications Perl5 written using MooseX::Declare and friends (see Task::Kensho
for a good start at "and friends") is a much different thing to the high speed
line noise-ish scripting perl that was the commonest sort a decade ago.

~~~
berntb
An informative comment from a really knowledgeable guy downvoted.

The comment in question was polite to a newbie flame without supporting data.
The flame was upvoted... like a large number of flames without
arguments/motivations.

I feel sad for HN.

OTOH, some language communities are hilariously pathetic in their fanboyism...
:-)

------
jacquesm
Any language that needs advocacy has already lost. Good languages are adopted
by people because they solve problems better than other languages. It is a
market place of sorts. As soon as you feel the need to advocate a language you
are actually advocating what you use, instead of letting the language speak
for itself.

The net effect of all this advocacy is possibly even negative, the more you
try to ram a programming language down peoples throats the less inclined they
are to give it a shot because they already have a negative experience before
even trying it.

Languages with an open and welcoming, real-world problem solving oriented
community tend to benefit from the people using it and talking about using it.
Those that simply hawk a language as 'great' and keep on hammering on its
strong points are missing the point here.

One of the reasons perl lost out not only to python but even to PHP is because
it has a stigma attached to it of being (very) hard to maintain.

That may be more of a reflection on perl programmers than on perl though.

~~~
systems
This is a bit unfair, most programming languages do get their share of
advocacy.

I would agree if you say that Perl is getting the bad type of advocacy, or
that those who are advocating Perl are not doing a good job!

Ruby get a lot of "good" advocacy, which sound like ... "Hey I did X in Ruby,
Ruby is awesome, Ruby is teh SHIZNET!"

Python normally get this type of advocacy, "...hey look how you can do the
same X in Python, but now its better"

Perl's advocacy, sounds like "...Perl is not dead!", which I agree sound like
a scary statement to make!

But anyway, all languages get some sort of advocacy! Perl is actually late in
the advocacy game, I guess this is why it so far gets the worst kind.

------
Raphael
I just discovered that a Perl script has made it possible to view 44 channels
of live British television. Incredible. <http://www.myp2pforum.eu/live-
tv/41045-british-tv.html>

~~~
pdcawley
And a host of Perl makes it possible for the BBC to serve up its iPlayer
content. Some of it is even modern MooseX::Declare based Perl.

------
phillipadsmith
Frankly, I found Simon Wilson’s response to my post more enlightening than
most of this entire thread: <http://simonwillison.net/2009/Nov/27/perl/>

------
wynand
One thing I would like to know: why hasn't anyone else duplicated CPAN?

I don't know Perl, but I've had to pull things from CPAN to make a Perl script
work and I was impressed.

At the moment I'm running parallel Python code on many different machines and
it's a pain to make to sure that all the right packages are installed. I'm
sure that something like CPAN would have helped.

~~~
billswift
CPAN is a community project, I doubt that anyone could create an equivalent
for another language, it would almost certainly have to be grown as the
original was.

------
martythemaniak
I'm a non-perl guy working in a very Perl heavy company, so hatred of it is
quite well justified, and based on discussions with many of my coworkers, it
seems the Perl community doesn't want to understand why the rest of the world
has moved on and has no interest in Perl anymore (resulting in this kind of
bullshit "please, please, please pay attention to me!!!")

\--The language sucks - yes it does. Usually the KISS principle is thought of
as a good thing, except in the Perl language where nothing is ever simple or
straightforward. There's 10 ways of doing every single little thing, and no
two developers do it the same way. It is not a language welcoming of new
developers, so as more schools and companies switch/abandon, I can only
imagine it declining further.

\-- it offers nothing new or exciting to most developers. If you're starting a
new project or company and you already know another similar language (say,
Python), Perl has nothing to offer. While it was innovative new 10-15 years
ago, most of the good has long been assimilated in other languages.

\-- real world perl sucks. a standard line amongst Perl monks is "you can do
that in Perl!". Exceptions, objects, web frameworks, clean code, etc. You name
it, you _can_ do it in perl. Except in the real world, hardly anyone ever
does, so Real World perl is as terrible as people fear. Python's strong
community standards, OTOH, pretty much make sure you're almost always writing
decent code.

As an example, I picked up both Django and Catalyst over the last year. With
Django (python newbie), I immediately picked up decorators and started using
them - both the built-in ones and my own. Its simple - just syntactic sugar
for a function wrapper.

Catalyst OTOH, tries something vaguely similar using method attributes -
except their are neither as powerful nor as simple/clear and despite many
years of perl experience on the team, few people had seen them used, used them
themselves, nor did they have a solid idea of how they work.

My point is, when you make something simple and accessible, it'll get used.
When all you do is repeat "you can do that" and wave your hands about, you'll
get ignored and eventually forgotten.

~~~
whiskeyjack
I work with this fellow so keep in mind there's history here between us on the
subject. :)

"the language sucks" -- Is very much in the eye of the beholder. Perl works
the way I think just as jQuery does. As for not being welcoming, I think
you'll find perlmonks.org to be a huge welcoming community.

"it offers nothing new" -- I'm sorry, but if you already know Python or Ruby
why would you switch anyhow? There's a big time investment in becoming really
good at a language. No reason to switch when you have languages that can just
get things done. I'm not even sure what you mean by "new". Perl is 22 years
old now. Python and Ruby are both around 15. What's new here? I also find this
"new" comment hilarious in light of the Python feature freeze. Things like
Moose and Catalyst are new(ish) to the Perl community and they're doing great
things. Further, CPAN is expanding at a huge rate, more than ever before.
There's ALWAYS new stuff there.

"real world perl sucks" -- Real world code sucks period. And I do clean code.
There are standards in Perl and they do evolve. You need to engage in the
community a little as I think everyone should with their languages.

What is fairly obvious to me is that Python fits very well with how YOUR brain
works. Perl fits very well with how MY brain works.

Just because it don't jive with you, doesn't mean it doesn't jive with others.

'Scuse me. I have a mod_perl2 handler to write.

~~~
rimantas
_"Perl works the way I think just as jQuery does"_

Never ever say this again.

~~~
whiskeyjack
why not?

------
danbmil99
I've successfully ignored it for a quarter century. It's an abomination.

~~~
jrockway
If you've successfully ignored it, how do you know it's an abomination?

~~~
billswift
Because somebody told him so.

------
jamii
I've always been put off by the impression that the semantics of Perl consists
mostly of edge cases. For example, the discussion of error handling here:

[http://www.yosefk.com/blog/what-makes-cover-up-preferable-
to...](http://www.yosefk.com/blog/what-makes-cover-up-preferable-to-error-
handling.html)

~~~
pdcawley
Which is why, if you're starting a Perl project today, you turn on warnings
and strict, you choose between TryCatch and Try::Tiny and you seriously
consider adding autodie to the mix.

------
zephjc
Why? I've been happily ignoring it for the last 10 years, and I think I can
continue to do so ;)

~~~
jrockway
That's why your Language Of Choice is missing many of Perl's features. But
hey, at least it has a lot of smugness.

(Smugness solves 0% of my programming problems, but at least I feel good about
not solving them.)

~~~
zephjc
I use Python, and the only thing missing from it is ugliness.

------
lele
I have been loving Perl until I knew sound languages. Then I realized all the
time it made me waste.

~~~
jrockway
Would you care to share some of these realizations?

------
seldo
I hate it, and am happy to continue hating it. Cheers!

------
trezor
My most common use of Perl:

    
    
         $ someCommandChain | perl -pe 's/because sed regex sucks/'
    

Maybe I could spend some time learning a new regex dialect to avoid perl
entirely, but for the time being this works for me.

~~~
jsrn

        >     $ someCommandChain | perl -pe 's/because sed regex sucks/'
        >
        > Maybe I could spend some time learning a new regex dialect
    

Maybe you should first learn the Perl regex dialect (the above regex doesn't
parse in Perl).

~~~
trezor
If it wasn't obvious I just intended to write something informative in there,
and couldn't come up with a clever substitution expression that would fit the
sentence.

------
StrawberryFrog
But ignoring Perl is my way of hating it. And it works.

