

Can Lisp do What Perl Does Easily? - omouse
http://groups.google.com/group/comp.lang.lisp/msg/fc76ebab1cb2f863
Erik Naggum on why Perl sucks :D
======
SwellJoe
Note the date. In 2000, Perl was, by far, the leading scripting language (and
language for the web). I'm certain that if this rant were written today, it
would target PHP, and possibly even Ruby and Python. Ironically, perhaps,
modern Perl is more lisp-like than any other mainstream language (aside from
JavaScript, in some ways), and so this article merely says, "Mainstream
languages that come pretty close to Lisp are brain-damaged and you'd have to
be a particular breed of crazy to use it for anything."

~~~
shiro
I _love_ his rant. There are so many colorful expressions in it that even if
you don't agree with what he says, you can enjoy how he says it.

Here's another my favorite, Erik on C++, from 1998:
[http://groups.google.com/group/comp.lang.lisp/msg/917737b7cc...](http://groups.google.com/group/comp.lang.lisp/msg/917737b7cc8510e3)

~~~
SwellJoe
Awesome. He's convinced that using a language (C++ or Perl, depending on the
rant in question) can cause damage to ones cognitive processes! He is a
colorful one.

I'm pretty sure I'd feel dumber after having worked in PHP for the past six
months on our new website, if that were true.

~~~
brlewis
No, if you were succumbing to the trap he described about Perl, then you would
feel smarter for having solved so many immediate problems.

------
epi0Bauqu
For Web stuff, I pretty much exclusively program in Perl and JavaScript when
left on my own. I like both a lot. I really don't get the anti-Perl reputation
as portrayed in this article, although as noted it is really old. Maybe it's
just my Perl code, but I can pick up code from 10 years ago and understand it
fine, and my Perl code never seems to gets out of hand as described in this
rant. You always have wonder with rants what the author was actually doing...

~~~
whacked_new
I don't think any particular language _causes_ brain damage like some more
strongly-opinioned people would say. But some make it easier to write nutty
code. It doesn't mean everybody writes nutty code.

Just like how being surrounded by junk food predisposes you to poor dietary
habits and possibly in consequence, heart problems, it's not impossible to eat
healthy and stay fit.

Shunning the environment/language/tool is understandable, but equating it to
the root of the problem always involves some exaggeration. The NASA code
released not long ago had GOTOs in it and I don't think it costed lives.

------
sgraham
The only concrete assertions I see there are that regular expressions are
error-prone (fine, if you really think so, don't use them), and that data in
Perl aren't s-expressions (I'm assuming that's what he's ranting about when
he's implying that all Perl is good for is massaging input formats).

So pretty weak: CPAN is the supreme, far-and-away, no-other-reason-or-
language-comes-close (at least in 2000) to use Perl.

~~~
lupin_sansei
Yes CPAN is perl's best kept secret. There's still nothing to touch it.

------
lupin_sansei
These ranters never actually show you any perl code that is particularly ugly
and compare it against some lisp/python/ruby code that solves the problem more
cleanly.

I'm sure that there are areas where other languages' solutions are much
cleaner than an equivalent perl one, but can anybody actually show us one?
Especially a lisp one.

~~~
SwellJoe
pg wrote a few in an essay. (And, unremarkably, though I'm going to remark on
it anyway, Perl stands up as well as any other mainstream language to the
onslaught. Perl 6 does even better, though I think one of the biggest side
effects of Perl 6 is going to be a huge influx of Haskell coders because of
Pugs.)

~~~
edu
And when will be Perl 6 ready?

~~~
lupin_sansei
The day before Arc comes out.

~~~
edu
Heh, that's a good one :D

------
herdrick
Wow - I use a lisp, but this argument is awful. Saying you can really quickly
whip up something that works in Perl is an overwhelming recommendation. That
the subsequent code in unmaintainable is a relatively tiny disadvantage.

From the linked-to post: "...the language rewards idiotic behavior... you can
commit any dirty hack in a few minutes in perl, but you can't write an
elegant, maintainabale program..." Sound familiar? That's the mating call of
statically typed language programmer and the top-down 'software architect'.
That's bad. And I'll admit, Scheme's libraries (I use Scheme) are in practice
somewhat statically typed and fussy, which sucks.

I've never used Perl - maybe I should. BTW, is Ruby really just as good for
quick 'duct tape' work and hacks? My very limited experience with Ruby made me
think it was good, but not extraordinarily handy.

------
snorkel
He sounds a tad disgruntled about his past jobs. He didn't answer the question
"can lisp do what perl does easily?" because the answer is no:
<http://weitz.de/cl-ppcre/>

------
aston
_the unemployed programmer had a problem. "I know", said the programmer, "I'll
just learn perl." the unemployed programmer now had two problems._

One of the best programming quotes. Ever.

~~~
SwellJoe
It was better the first couple hundred times I heard it.

Jamie Zawinski's from 1997 is the most famous in modern times:

"Some people, when confronted with a problem, think "I know, I'll use regular
expressions." Now they have two problems."

But, it dates back even further to a "D. Tilbrook" from before 1988:

"Whenever faced with a problem, some people say `Lets use AWK.' Now, they have
two problems."

There's an XML variant that had quite a lot of popularity in the early 00's.

~~~
omouse
It's funny because they're all accurate. XML is an ugly beast, regular
expressions can be amazingly obfuscated. I don't know about AWK, but I'm
guessing that it's as ugly as Perl.

~~~
SwellJoe
Brian Kernighan created Awk. And who are you again?

You've misunderstood the fundamental UNIX nature of these quotes. They are
said by people who use the tools in question regularly. jwz doesn't avoid
regular expressions for everything (he'd be a fool to do so, and he's no
fool)...he's merely pointing out that regexes can be misused, and often are.
Likewise Awk.

By cloistering yourself into Lisp, and nothing but, you're missing out on
years of aggregate wisdom from some of the smartest people in computing. Lisp
is one of those really valuable pieces of wisdom. But it is not the only one,
or even the most important. Deny yourself the rest of the history of
computing, and you are doomed to reimplement it...and you'll almost certainly
do it poorly.

------
herdrick
'Maintainability' is the last refuge of the fussy language.

------
epi0Bauqu
The date should really be noted in the title of the post.

~~~
omouse
Why?

~~~
SwellJoe
Because the ranter was pissed that his favorite language was not very viable
commercially, and a language he strongly dislikes was the most popular
language on the web, with many job opportunities. Bitterness colors his logic.

