Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Perl is dying

by tilly (Archbishop)
on Jul 14, 2006 at 21:56 UTC ( [id://561343]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl is dying
in thread Perl is dying

If you're familiar with both Ruby and Perl, you'd know that text manipulation is as much an innate part of what Ruby is at it is an innate part of what Perl is.

Perl beats Ruby for such tasks for the following three reasons: people already know Perl, there are more (and better) libraries for Perl, and Perl is somewhat faster on benchmarks. Those are listed in what I believe to be decreasing order of how commonly they come up.

Note that I did not include in the list that Perl is better for text manipulation. That is because I believe it isn't. Ruby can generally express the same concepts as concisely or more concisely than Perl. Ruby has several nice features that Perl does not, for instance I like the fact that Ruby natively lets you iterate over the lines in the string. And Ruby avoids some gotchas that Perl has, for instance using $& somewhere in your program doesn't slow down every other regular expression like it does in Perl.

Replies are listed 'Best First'.
Re^5: Perl is dying
by webfiend (Vicar) on Jul 14, 2006 at 22:00 UTC
    True enough. I fall firmly into that first camp. I already know Perl, so it's often my first choice. This is in spite of the fact that I've been using Ruby for various sundry projects for about 5 years now. Plus colleagues in my colorful employment history get all jittery if I mention a language other than Perl or Java in the context of "say, couldn't we do this in X?"
Re^5: Perl is dying
by zby (Vicar) on Jul 15, 2006 at 19:20 UTC
    I think there is one thing where Perl have some advantage in text processing over Ruby - it is handling Unicode. Granted this is only second hand - but I've heard Ruby has some deficiencies here.
Re^5: Perl is dying
by demerphq (Chancellor) on Feb 10, 2007 at 16:36 UTC

    for instance using $& somewhere in your program doesn't slow down every other regular expression like it does in Perl.

    In perl5.10 there is a new way to do this that doesnt come with a generalized performance penalty. In fact, Perl 5.10 expands the regex syntax greatly and offers some nice new optimisations.

    ---
    $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561343]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found