Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

There are four ways in which one language might be better than another, off the top of my head. any remarks about python which follow are not very well-informed, by the way.

1. it suits your tasks
If you're munging masses of data, dealing with texts, creating conversational interfaces, doing things quickly, designing as you build (oops), or no doubt many other things I haven't encountered, perl is what you need. I'm afraid someone else will have to write the corresponding python list, but i'm sure it's long too.

2. it suits your temperament
Perl is muscular, idiomatic, expresssive, poetic, ambiguous, robust, a little messy. Python is meticulous, brittle, precise, clear and direct. There are people who prefer that, and it certainly makes it easier to read someone else's code. But less fun.

3. it's widely-used
This confers obvious benefits in terms of your employability and versatility. In the case of perl it also gives us cpan, which is priceless, perlmonks, *.pm, and so on. It's not a level playing field, of course: perl's ubiquity is an accident of timing as much as anything. If python or ruby had been a normal part of the unix toolkit when the web exploded, who knows what this site would be called?

4. it's powerful
This is really the same as (1) - it can't be taken out of context and still mean anything - except for the fact that your tasks might change, or your understanding of them. If we had to define power, it's probably a product of the range of uses to which a language can be put and its ease and strength in each case. In that context, perl is more powerful than python: it's more versatile, it's easy to grasp and in the hands of a good idiomatic programmer, very strong indeed. But there are well-understood edges to the domain in which perl excels, and C is more powerful still, on this scale. But if it doesn't suit your needs...

To me, perl is better suited to my work and my tastes than anything else out there, and in my opinion it's a better investment in terms of what it might one day allow me to do.

but ymmv

PS. one quite often encounters arguments based on what perl programs are like, rather than what perl is like. If you come across one, make sure that people are comparing like with like. There's a lot of bad perl out there, not because perl is bad but because it's accessible and forgiving. These are good qualities.


In reply to Re: Perl VS Python by thpfft
in thread Perl VS Python by supernewbie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others examining the Monastery: (5)
    As of 2024-10-13 20:41 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.