

Perl advocacy, smells like blub. - edu
http://www.oreillynet.com/onlamp/blog/2007/08/perl_is_dead_long_live_perl.html

======
staunch
I found cromatic's article fairly weak. It's basically impossible to get past
the amount of uncoolness Perl has collected and not really worth trying. But I
use it and enjoy it tons despite the snide remarks I must endure. A small
price to pay in my opinion.

It's obvious to anyone being honest that the main reason most people don't
like Perl is for the same laughable reason they don't like Lisp: the syntax
looks scary at first. Few people really get past that point without coming to
at least respect its power.

For web development I'm using Catalyst[1] DBIx::Class[2] and Template
Toolkit[3] combined with CPAN[4] it's an unstoppable combination. Most of my
work is plugging modules together cleanly. My code is small, efficient, and
rock solid.

I've dabbled with Python and Ruby quite a bit but I just don't find
significant advantages and missing CPAN always hurts. It's good that there are
lots of people writing Python and Ruby code now. In 5 years there might be
enough libraries to make them as useful as Perl is today.

1\. [http://search.cpan.org/dist/Catalyst-
Manual/lib/Catalyst/Man...](http://search.cpan.org/dist/Catalyst-
Manual/lib/Catalyst/Manual/Intro.pod)

2\. [http://search.cpan.org/~mstrout/DBIx-
Class-0.08003/lib/DBIx/...](http://search.cpan.org/~mstrout/DBIx-
Class-0.08003/lib/DBIx/Class/Manual/Intro.pod)

3\. <http://template-toolkit.org/docs/manual/Intro.html>

4\. <http://search.cpan.org/>

~~~
Goladus
As someone learning both Perl and Lisp right now, I'm going to disagree on
mere cosmetics as the main thing that scares people away. I'd also disagree
that the reasons people get scared away are the same for each language. Perl
is scary because there's loads of arbitrary syntax and shortcuts that you have
to memorize. Lisp is scary because there are some unusual concepts that need
to be learned before you can accomplish anything useful.

When learning Perl, I often find myself thinking "how do I do X?" Then I go
look up the trick to doing X. When learning Lisp, I find myself thinking "I
know I'll be able to do X, once I understand these rudiments well."

Consider the accumulator generator: <http://www.paulgraham.com/accgen.html>.

How would you assign the generated accumulator function to a variable and call
it?

In Perl, you look up the syntax for assigning the returned function to a
variable(or just guess and you'll probably be right). Then, you look up the
syntax for calling the stored function (if you guess you'll probably be
wrong).

    
    
        $s = foo(5);
    
        &$s(1);
        &$s(1);
        $s->(1);
    

In common lisp (I used CLISP), you can copy the Perl way of just using a value
assignment, then using the apply or funcall function to call the stored
function. This is all in Chapter 2 of _On Lisp_

    
    
        (setq s (foo 5))
    
        (apply s '(1)) 
        (apply s '(1)) 
        (funcall s 1) 
    

Or, you can learn how to assign using symbol-function, and then you'll be able
to call stored function like any other:

    
    
        (setf (symbol-function 's) (foo 5))
    
        (s 1) 
        (s 1) 
    

In Python, just guess and you'll be right:

    
    
        s = foo(5)
    
        s(1)
        s(1)
    

In my opinion, the Python version is by far the most intuitive. Call the
function, assign the result to a variable, which is then callable like any
other function. Lisp is more flexible and fun but takes more time to
understand some aspects of the underlying interpreter. Perl is almost just
like Python except I have to remember to put the right ASCII characters around
my variables to get the right behavior. There doesn't seem to be a way to call
a stored function just like you'd call any other function in the language.
You'll always need that ampersand or the arrow. That's really annoying, just
like it was really annoying in BASIC to have to use "CALL" to call a
subroutine, and how you need wrapper objects in Java to call any Method. Maybe
there is a way to do it, but it's probably completely random and buried in the
documentation somewhere.

------
pg
For me this had the opposite of the intended effect. Before I read it all I
was thinking was "You don't hear as much about Perl lately." Now it's "Perl
seems to be sinking."

~~~
mechanical_fish
Important marketing safety tip: Never compare the language you're trying to
advocate to Cobol.

"Our language may be dead, but its ghost will haunt you forever" is not a good
slogan, even if it is true.

------
zach
Great article for the summer -- all that hand-waving created a lovely breeze
while I was reading it.

