
Ancient languages: Perl (2004) - fogus
https://sites.google.com/site/steveyegge2/ancient-languages-perl
======
sigil
A later Yegge post sums up my reaction to this (I still write Perl from time
to time):

 _As I 've done for a great many other programming languages, I've bashed on
Perl's technical weaknesses at length in the past. To my continued amazement,
the Perl folks are the only ones who never get upset. They just say "Haha,
yeah, boy, you're right, it sure is ugly. Heh. Yeah, so, um, anyway, I'm going
to get back to work now..." It's awesome. I've gained so much respect for
them. It's almost enough to make me go back to programming in Perl. Well,
almost._

[http://steve-yegge.blogspot.com/2006/10/egomania-itself.html](http://steve-
yegge.blogspot.com/2006/10/egomania-itself.html)

------
peterwwillis
Fun fact: Perl probably encompasses more supporting library code than any
other language other than C.

The Comprehensive Perl Archive Network (CPAN) currently has 123,757 Perl
modules in 28,037 distributions, written by 10,829 authors, mirrored on 270
servers.

Back in 2004 (almost 10 years; there's been some developments since then)
someone ran SLOCCount on all of CPAN, and it estimated the development cost at
about $677 million dollars.
[http://web.archive.org/web/20041010230806/http://www.etla.or...](http://web.archive.org/web/20041010230806/http://www.etla.org/cpan-
sloccount-report.txt)

Before you choose another language for your project, ask yourself if it's not
going to cost more to write everything you'll need, or if using pre-existing,
time-tested code might do the trick for cheaper.

The one downside about Perl that I think is the most unfortunate is the ninja
aspect. You have to be a Perl ninja to write good Perl code. There's no two
ways about it. If you come from a different language, you have to ignore all
the rules and guidelines you used to develop in, and learn the Perl way, or be
ye damned. Which is why most Perl code you've been forced to maintain sucks.

~~~
andrewvc
That's mostly a function of age*avg.popularity.per.year. Java, python, ruby,
etc. have been around long enough that available libraries are equivalent if
not better.

A lot of CPAN's libs are likely cruft from the language being so old, the size
of it says nothing. What's more interesting is how often libraries are updated
with new code, and how often people use them.

~~~
peterwwillis
Oh, right, old code. CPAN is funny in that they have a central location to
test multiple versions of code on multiple platforms and comment/patch them
over time. I don't know of anything similar for any other language, probably
because there isn't a CPAN equivalent for any other language (edit: there is
JSAN and CCAN, but not quite the same).

[http://stats.cpantesters.org/](http://stats.cpantesters.org/)

Want to see how old code stacks up in testing? Let's pick a module and see all
its dependencies and their test results. XML::Feed as a random example:
[http://deps.cpantesters.org/?module=XML%3A%3AFeed&perl=lates...](http://deps.cpantesters.org/?module=XML%3A%3AFeed&perl=latest&os=any+OS)

Hmm, says no results for some of them. Let's drill down and select
HTTP::Negotiate to see its test results.
[http://www.cpantesters.org/distro/H/HTTP-
Negotiate.html](http://www.cpantesters.org/distro/H/HTTP-Negotiate.html)

Looks like the latest version has been tested on lots of platforms, and it's
good! Let's pick a different piece of code, something older, say from 2005?
[https://metacpan.org/release/DOMIZIO/CGI-Builder-
CgiAppAPI-1...](https://metacpan.org/release/DOMIZIO/CGI-Builder-
CgiAppAPI-1.27) [http://www.cpantesters.org/distro/C/CGI-Builder-
CgiAppAPI.ht...](http://www.cpantesters.org/distro/C/CGI-Builder-
CgiAppAPI.html)

Ah! So we see the last version it worked with and on which platforms, but on
the latest perl it's failed its tests. We can drill down and see why the tests
failed:
[http://www.cpantesters.org/cpan/report/c91a8b7c-4983-11e1-94...](http://www.cpantesters.org/cpan/report/c91a8b7c-4983-11e1-94c9-6af50df65b4f)

Hmm, unprefixed autoloaded parameter. That's probably not too difficult to
fix. I guess even though there's old crufty code that isn't always maintained
across versions, we have pretty good visibility into when something failed,
and with good tests we know why and how to fix it.

There's a lot more resources to take advantage of through CPAN, like bug
trackers, review sites, development wikis, etc.
[http://en.wikipedia.org/wiki/CPAN](http://en.wikipedia.org/wiki/CPAN)

~~~
Zuider
>Hmm, says no results for some of them.

A bad sign. This is usually the result of a single test hanging indefinitely,
leading to the necessity of killing the entire automated testing process. As a
consequence the test results don't get sent to cpantesters.org, putting the
onus on the user to file a bug report.

------
cdoxsey
His take on Larry Wall is terribly uncharitable:

    
    
        First: Larry is insane. This means more to me than anything in the language itself. I prefer my heroes to have a firm grasp on sanity. I was never a fan of Don Quixote. Larry says God talks to him, and tells him that He hates non-Perl programmers. Larry is a fruit cake, a nut job, crazy as a loon, batty as a belfry.
    

Having read the interview
([http://interviews.slashdot.org/story/02/09/06/1343222/larry-...](http://interviews.slashdot.org/story/02/09/06/1343222/larry-
wall-on-perl-religion-and)) I don't see how anyone could come away thinking
this. Larry Wall seems like a nice guy to me.

~~~
Dirlewanger
Did you miss the fact that this is indeed a drunken rant?

~~~
mpyne
Does that matter? Does being drunk make you uncharitable, or does it merely
prevent you from controlling yourself before you announce it to the world?

~~~
berntb
Yegge "proved" someone insane literally by arguing as if a humorous speech was
serious. If that isn't _uncharitable_ or worse, I need a new dictionary.

Also, this is an old, old rant. It must have been posted multiple times with
other URLs.

~~~
mpyne
Sorry, I thought we were talking about Yegge, I knew Wall's speech was not
meant to be serious... wasn't sure about Yegge's post.

------
ceautery
"First: Larry is insane."

As cdoxsey says, this as uncharitable, however it's not without a grain of
truth. He's a bit of a loon, but a lovable loon.

That being said, what he helped add to the technology ecosystem is as
important as GNU/Linux. Perl is remarkably expressive, and I've found in my 18
year IT career that no other single tool has paid me back as much for
investing my energy into learning it, both in better "kung fu" (than you Ringo
Langly), and also in plain old cash-money.

It's worth adding to your bag of tricks, even if you feel, as the article's
author does, that the docs are unwieldy, the community is filled with zealots
and cults of personality (to Larry himself, as well as to Merlyn and his ilk),
and the syntax is irritating. It's still worth your time. If you invest enough
in it to grok the language, you __WILL__ be a better overall developer.

------
snorkel
"Every operator in Perl (not just the Range operator) has six different
behaviors depending on the invisible context in which its surrounding
expression is being evaluated."

... and unfortunately context sensitivity of operators became much more
prevalent in Perl 6 than Perl 5. It was hard to imagine the core Perl
maintainers thought that context sensitivity was a feature that needed further
enhancement, but that's just what they did in Perl 6.

Programming language design comes down to one word: teamwork. Software is
collaborative writing. The better languages allow teams of developers with
mixed levels of skill to work together and be productive, to build on each
other's code.

Perl 5 had enough quirks and cute context idioms to be clever and interesting,
yet it was still possible to decipher what other coders had intended and learn
a few new tricks along the way. Perl 6 is a toolkit for outright hostile
obfuscation making it damn near impossible for a team of developers to wrap
their heads around each others' code. Not surprisingly Perl is fading into the
past.

~~~
berntb
>> Perl 6 is a toolkit for outright hostile obfuscation making it damn near
impossible for a team of developers to wrap their heads around each others'
code. Not surprisingly Perl is fading into the past.

I don't know enough about Perl 6 to comment on your opinions of it. I do find
it really funny when you condemn a language (Perl) based on a very different
language (Perl 6).

I guess you dislike C because C++ is overly complex, too...?

Edit: saraid216, I don't know if you troll or have no clue? Google. Most every
source you'll find emphasize that Perl/Perl 6 should be seen as different
languages.

~~~
saraid216
> (Perl) based on a very different language (Perl 6)

Since when does a version increment make it a "very different language"?

How is it comparable between C and C++?

If anything, it's disliking C89 because of C90.

~~~
TylerE
Because it really is a seperate language. Going from Perl 5 to Perl 6 is like
going from Algol to C++11

------
antitrust
I like Perl. It's usually the fastest way to get stuff done. It also brings
out the programmer within the programmer. Any jerk can write obfuscated Perl.
A good Perl programmer writes clean, easily re-used and modified code. It's a
very hacker friendly language.

As to its decrease in popularity, I'll point to two factors: (1) the rise of
PHP, which took over most of the daily web-based tasks that Perl uses and (2)
the rise of frameworks, which meant that people writing web sites were using
newer languages so they didn't have to re-roll the basic stuff with each
project. Perl didn't compete in that area until much later.

As far as its daily use, I still see it all the time and like many
programmers, I implement new Perl code frequently. The flexibility across
operating systems is a nice bonus.

For anyone who wants to see Perl written with grace and foresight, try these
resources:

[http://www.perlmonks.org/](http://www.perlmonks.org/)

[http://www.pm.org/](http://www.pm.org/)

------
stackcollision
I'm probably going to get downvoted for this, but...I actually really like
writing Perl. It's fun, and even the documentation has character.

~~~
bane
I agree, Perl has a funny way of just naturally rolling off of the fingers in
a way other languages don't. With a little care it's really quite
maintainable.

~~~
Diederich
That's really the key; it does take some discipline to write maintainable
Perl. But there's so many tools to help with that.

------
kyllo
That was a fun read from 2004, if largely irrelevant in 2013. Perl 6 finally
has a stable release, but hardly anyone uses it. Perl will continue to have a
place in UNIX sysadmin and quite a few hackers' toolkits for a while, but by
now most new programmers are starting with Python or Ruby or even Javascript
as their primary scripting language. New programmers are generally not
learning Perl and haven't been for a while.

~~~
zokier
> Perl 6 finally has a stable release

Wait, when did this happen?

~~~
kyllo
Hmm, perhaps I was wrong and it hasn't yet. Rakudo's latest release was in May
2013, but it looks like they aren't actually passing all of the tests yet.

------
coldtea
> _You see, someday I will start my own company, and I 'll decide my own
> hiring bar._

Yes, meanwhile people using Perl succesfully should care, because?

~~~
VLM
I'll summarize the article:

1) He hates Larry, therefore we should all hate Larry's language.

2) He looked in the official detailed technical docs when he was looking for a
"learning..." book or a "... for dummies" book. By analogy he was looking for
dietel and dietel but when he picked up stroustrop his eyes started burning.

3) He hates the idea that references exist and some people like them and use
them. Although you don't have to use them, at all. Also if you insist on
implementing your own object oriented design the slow hard way by hand using
references instead of "use Moose;" like a normal person, its hard and slow
just the way you asked for it, instead of being made impossible.

4) He doesn't like the large number of features. He especially dislikes the
single/double character magic variables. Some of them take as much as 30
seconds with google to learn and use!

5) Strange rant about lego as a programming language analogy, which boils down
to much like lego, languages should have just a handful of fully understood
small pieces that hurt your feet when stepped on barefooted; You must fully
understand all (few) language features before programming. I think he's
calling for the return of Basic Assembly Language on a S/360 mainframe, or
perhaps a more RISC alternative like enterprise grade 6502 machine code.

Its a weird essay. I think its a parody of the recent spat of perl-hate.

~~~
irahul
> Although you don't have to use them, at all. Also if you insist on
> implementing your own object oriented design the slow hard way by hand using
> references instead of "use Moose;" like a normal person, its hard and slow
> just the way you asked for it, instead of being made impossible.

If you are a perl programmer, you have to know and use references(pass hash,
pass array with other params, nested data structures...). "you don't have to
use them" is true in the sense that you don't have to use anything - you don't
have to use lists, hashes, OOP, what have you. The same goes for OOP. Moose is
an option for new code, not for code which has been written with blessed
references.

I don't have anything against references; I do have something against using
references and de-references for nested data structures and passing data
structures to functions. Yes, I do understand references, but I will take the
way Python and Ruby make do without references over Perl's references any day.

~~~
VLM
"not for code which has been written with blessed references."

Thanks for pointing that out, it is an unfair article because the whole
premise of the parody was if the author was running a blue sky startup... so
legacy code sucks is not much of an argument.

Some time ago I reflexively converted everything perl OO that I touched to
"modern" Moose and it seems to have been worth it. Detection of non-Moose OO
should be a Perl::Critic complaint. You can always add something to the
exclude= line in a perlcritic.rc file. We've already got Perl::Critic::Tics
and ::Lax and a bunch others, so ::FanOfMoose to complain about non-Moose OO
is within the realm of possibility.

------
sklivvz1971
Language haters are only marginally less grating than language fanbois, who in
turn are slightly less annoying than functional language fanbois.

Not a particularly enlightening - or for that matter, accurate or
representative - opinion piece.

------
16s
Many Unix systems include Perl by default. This seems like a small thing, but
in areas where 3rd-party software is not allowed (security and audit
compliance issues), having a Perl interpreter is wonderful.

~~~
jsymolon
However, the base install of perl should be used for system maintenance only
and not used for general purpose apps as the base install is just so old (5.8)
that its a security hole. Installing a newer version is easy and can be
updated independently of the system perl without breaking anything.

------
restofus
[http://steve-yegge.blogspot.in/2006/10/egomania-itself.html](http://steve-
yegge.blogspot.in/2006/10/egomania-itself.html)

Here he talks a bit about the perl community

------
jimfuller
the existence of a language should not be a threat, its ok for you to move on
from Perl.

------
jk4930
Here's why Perl is great:
[http://www.foo.be/docs/tpj/issues/vol1_1/tpj0101-0002.html](http://www.foo.be/docs/tpj/issues/vol1_1/tpj0101-0002.html)

------
ryan-allen
Steve wrote this before Clojure came out! I wonder what Steve thinks of it. I
have done some work in it and it seems really quite good for Real Projects
(tm).

~~~
willismichael
Steve seemed to start out really liking clojure, but the more he used it, the
more gripes he seemed to have:
[https://groups.google.com/forum/#!msg/seajure/GLqhj_2915A/f-...](https://groups.google.com/forum/#!msg/seajure/GLqhj_2915A/f-JpotiBTfAJ)

