Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Perl Programming IT

Perl's Glory Days Are Behind It, But It Isn't Going Anywhere 379

snydeq writes "Deep End's Paul Venezia waxes philosophical about Perl stagnancy in IT. 'A massive number of tools and projects still make the most out of the language. But it's hard to see Perl regaining its former glory without a dramatic turnaround in the near term. As more time goes by, Perl will likely continue to decline in popularity and cement its growing status as a somewhat arcane and archaic language, especially as compared to newer, more lithe options. Perhaps that's OK. Perl has been an instrumental part of the innovation and technological advancements of the last two decades, and it's served as a catalyst for a significant number of other languages that have contributed heavily to the programming world in general.'"
This discussion has been archived. No new comments can be posted.

Perl's Glory Days Are Behind It, But It Isn't Going Anywhere

Comments Filter:
  • by Viol8 ( 599362 ) on Tuesday January 29, 2013 @06:20AM (#42723961) Homepage

    "The fact is that Python today is taking over where Perl would have dominated in the past. "

    And the reason for that is that python has equivalent functionality to perl (unless you really need to compose an entire program in 1 line of regexp and a loop), can also be used for quick-n-dirty tasks but is actually readable and structured and while its OO system isn't perfect its a damn site better than the nailed on dogs dinner that is Perls.

  • Re:Wait, what? (Score:4, Informative)

    by Anonymous Coward on Tuesday January 29, 2013 @07:13AM (#42724179)

    I'd still say they don't have an easy regex.

    Perl's is an actual operator in the language, all other languages require you to build and use a regex object... which means 1 line in perl requires more lines (define+create, then test) in others to do the same.

  • by Anonymous Coward on Tuesday January 29, 2013 @07:32AM (#42724263)

    No. Just no.

  • Re:Wait, what? (Score:4, Informative)

    by stjobe ( 78285 ) on Tuesday January 29, 2013 @08:27AM (#42724517) Homepage

    From perlfaq1 [perl.org]:

    What's the difference between "perl" and "Perl"?
    "Perl" is the name of the language. Only the "P" is capitalized. The name of the interpreter (the program which runs the Perl script) is "perl" with a lowercase "p".
    You may or may not choose to follow this usage. But never write "PERL", because perl is not an acronym.

    From wikipedia [wikipedia.org]:

    Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language.

    From Learning Perl, 2nd Ed:

    Perl is short for "Practical Extraction and Report Language," although it has also been called a "Pathologically Eclectic Rubbish Lister." There's no point in arguing which one is more correct, because both are endorsed by Larry Wall

    Either way, typing the name of the language in all-caps is wrong.

  • Re:Perl's a mess (Score:4, Informative)

    by vlm ( 69642 ) on Tuesday January 29, 2013 @08:46AM (#42724617)

    On the one hand, with Perl, you can't even create and use a multi dimensional array without barely comprehensible hacks.

    Unimpressed.

    http://perldoc.perl.org/perldsc.html#ARRAYS-OF-ARRAYS [perl.org]

    $AoA[0][0] = "Fred";

    print $AoA[0][0];

    I will give you that iteration syntax over a AoA can look a little weird to the uninitiated.

    I pretty much stopped using multidimensional arrays as a complex data structure when I learned OO except for the obvious mathematical applications. Although for hard core math I tend to take advantage of octave. I've used Inline::Octave from cpan but thats kinda weird.

    I wouldn't do massive scale text processing in Octave unless I had a really good reason, much as I wouldn't do massive math work in Perl unless I had a really good reason.

    The easiest "hack" on AoA is not to use them, if the application is simple enough. If you just need a crude data store just make a simple hash. So instead of [2][3][4] as a 3-dimensional coordinate, just store "2 3 4" as a hash key.

  • Re:Wait, what? (Score:5, Informative)

    by spxZA ( 996757 ) on Tuesday January 29, 2013 @08:49AM (#42724639)
    In my third year of varsity, we had to write a search engine with indexing stored in files. My Perl solution returned results twice as fast (averaging 22ms/query) as any other in the class, most of which were C or C++. And it took me half the time to write.
    I love Perl mainly because of I am a lazy programmer. Yes, most of my Perl scripts take a little bit longer to execute, but we're talking a difference of seconds or minutes, not hours. There are times where I choose Perl, Python, C/C++, PHP, etc, but this depends entirely on the problem and the circumstances. I will use Perl until I die, even if there aren't any more releases from now on.
    Should we lament Bash for the same reasons? The last release (4.2) was 13 Feb 2011, and the last feature release (4.0) in early 2010. ZOMG!
  • Re:Wait, what? (Score:4, Informative)

    by Rysc ( 136391 ) * <sorpigal@gmail.com> on Tuesday January 29, 2013 @09:37AM (#42725009) Homepage Journal

    Confusing is in the eye of the beholder. Consider

    sub read_file{
        my $file = shift;
        open(FILE, $file) or die "$!";
        chomp(my @file = <FILE>);
        close(FILE) or die "$!";
     
        my %file;
        while my $line (@file){
            my($key, $value) = split /=/, $line;
            $file{$key} = $value;
        }
        return %file;
    }

    To a Perl programmer this is all very clear despite having multiple things called 'file' in the same scope. What would you prefer? "$file, $file_handle, $file_array, $file_hash"? There are a lot of things you could do instead but they're not much clearer or easier to read, and this is more than sufficiently clear.

    And before you say anything, yeah this is not the best way to write such a function. If you're thinking "WTF?" the answer is "For illustration I went with something that should be fairly clear to non-Perl people" and "I'm trying to use as many different types of variable as possible."

  • Why I still use Perl (Score:4, Informative)

    by KeithH ( 15061 ) on Tuesday January 29, 2013 @01:09PM (#42727947)
    In a nutshell, I still use Perl heavily because I get paid to produce software - mostly embedded realtime telecom s/w but also a lot of tools as well. Pragmatism dictates that I use the tools with which I am proficient and which are universally available. Twenty years ago, I had to use Bourne shell more than I liked because I could only count on the availability of /bin/sh. Now, I have the luxury of being able to expect /bin/perl (version 5 no less). This counts for a lot in an environment where my hundreds of colleagues and I use hundreds of different servers with different operating systems, distributions, versions, and architectures. Yes, there is a lot to complain about with Perl but at the end of the day, Perl is still an excellent tool for many many problems and won't disappear from industrial applications any time soon.

Intel CPUs are not defective, they just act that way. -- Henry Spencer

Working...