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

Re^2: perl's forte

by Aristotle (Chancellor)
on Mar 20, 2004 at 07:41 UTC ( [id://338258]=note: print w/replies, xml ) Need Help??


in reply to Re: perl's forte
in thread perl's forte

This sounds like a copy+paste from a textbook. Have you actually done any work with XSLT? Have you actually written dynamic webpages in PHP or written OO code in Python or Ruby? How much text processing have you done with awk/sed/etc?

Of all the things you mention, the one I have no experience with is Python. Of all the other claims, the only one I can confirm is that Ruby OO is cleaner. I strongly disagree on all other points.

XSLT is a gigantic pain to work with, for a large variety of reasons from the mundane to the esoteric. Given the choice and an XPath capable XML module, I'd use Perl over XSLT every time without fail.

For text processing… well I don't know how you can write what you did, because Perl was invented because these tools were too limited to begin with. Note that I'm not sure what yacc is doing in that list, because it has a very different focus than the other tools (they're all about processing text in the furthest possible sense, I guess). I've written tons of trivial and non-trivial sed scripts, and while my awk exposure has been limited, I have written a handful of non-trivial scripts, enough that I think I have a feel for the language. None of these tools is very useful for anything more than pretty simple tasks.

As far as PHP is concerned, it really should be likened to the Template Toolkit rather than the whole of Perl. Give me Perl, any day of the week.

Just about the only thing that I can think of where Perl is a bad choice is raw, unadulterated number crunching. PDL helps, but really that's the domain of C. For any kind of data munging task — not just pure text processing, but really anything that involves combining or extracting data somehow, whether that be XML, database work, or whatever you can dream of —, no competitor comes close to Perl.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^3: perl's forte
by etj (Deacon) on Jun 23, 2022 at 15:52 UTC
    Just about the only thing that I can think of where Perl is a bad choice is raw, unadulterated number crunching. PDL helps, but really that's the domain of C.
    Only if you really, really like explicit for-loops, memory-management, and POSIX threading. If you don't, PDL is vastly superior.
Re: Re^2: perl's forte
by hardburn (Abbot) on Mar 21, 2004 at 02:55 UTC

    Have you actually done any work with XSLT?

    Nope, but see this Kuro5hin.org article on XSLT, which is the reason I don't bother at all.

    Have you actually written dynamic webpages in PHP . . .

    Yes, I keep knocking my head against it's limitations.

    . . . or written OO code in Python or Ruby?

    Yes. They're both cleaner than Perl OO.

    How much text processing have you done with awk/sed/etc?

    Hardly bother to use them, since Perl does what I want.

    Note that I was very careful with the wording of each of those statements. PHP is simpler than Perl. Python/Ruby OO is cleaner. Sed/awk/grep/etc. are more specific to text processing. And XSLT is arguably superior (though I wouldn't make that argument myself, clearly somebody thinks it's better (even if they're PHBs) or it wouldn't exist). These are very specific statements of overall "goodness".

    What I didn't say was that they were all absolutely superior. Particularly in PHP's case. It is simplier, and that's preciely why I don't like it.

    Update: Speeling mistake. Thanks tilly.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found