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

Well, some things are. However $foo = $bar || $baz doesn't work in PHP. Or even $foo ||= $bar.

Replies are listed 'Best First'.
Re^7: Another prediction of Perl's demise
by apotheon (Deacon) on Nov 28, 2004 at 03:08 UTC

    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.

        Any Turing-equivalent language can do anything any other Turing-equivalent language can do, generally speaking. What makes Perl so powerful is that it can do most anything with a fair amount of (relative) ease.

        In any case, my point was in large part simply that you should choose the right language for the job at hand.

        - apotheon
        CopyWrite Chad Perrin