Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Another prediction of Perl's demise

by apotheon (Deacon)
on Nov 26, 2004 at 07:18 UTC ( [id://410521]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Another prediction of Perl's demise
in thread Another prediction of Perl's demise

Your "that's not very much code" example is, in terms of a size ratio, a staggering increase in "effort". If you happen to be writing something involving a lot of tasks that compare similarly between the two languages, the difference can really pile up.

I'm afraid I don't really know anything about the Slurp module, and don't feel like looking it up right now. Thus, I can't really comment on the second example at this time.

In any case, my point was that some things are easier in PHP. Perhaps there are easier ways (or means that have roughly the same ease) to do these things in Perl, but if so, I certainly don't know them all. I suppose there's always the possibility that I'm just Wrong, and all PHP sucks ass horribly beside comparable use of Perl, but I tend to think that's not so — else the PHP language would never have been created in the first place.

- apotheon
CopyWrite Chad Perrin

Replies are listed 'Best First'.
Re^6: Another prediction of Perl's demise
by Dylan (Monk) on Nov 27, 2004 at 17:09 UTC
    Well, some things are. However $foo = $bar || $baz doesn't work in PHP. Or even $foo ||= $bar.

      Great. So, when your choice of language for a given task is determined entirely by your ability to use that particular expression (or equivalent), use Perl. That's no strict declaration that you should always use Perl for everything, all the time, though.

      The fact that hammers are better at pounding nails is not an indication that you should always use a hammer for every task, eschewing the use of screwdrivers. Use the right tool for the job at hand.

      - apotheon
      CopyWrite Chad Perrin

        I was merely pointing out that each language has things that are easier to do. Also I find I need to assign default values to variables more often than I need to include the entire contents of a file into a var -- which is not a good idea on large files anyway.

        personally, I use perl, ruby, O'Caml, scheme, and C. Each is better for certain tasks.

        But perl is no mere hammer, it is a swiss army chainsaw. You want to do something? Chances are you can do it in perl.

Log In?
Username:
Password:

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

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

    No recent polls found