Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
as a reply to a post which included C, C++, Java, Python and Haskell source code.

A belated post to the thread caused me to look back at it, I found this which I missed before, and would like to respond.

I didn't offer PHP because I've never used it. I have used all of the languages I posted samples of. (Albeit that my "use" of Haskell has been quite limited.)

Whilst I might have found equivalent examples on-line; I would not have been able to judge a good example from a bad.

My point is that Perl is not unique in its ability to provide concise solutions to text processing problems.

I don't think I claimed it was "unique".

The PHP solution is a little longer,

Actually, quite a lot longer.

but is arguably more readable

One-liners aren't meant to be readable. (No one is going to be code reviewing my console history:)

Just as a carpenter doesn't use a dovetail joints for shuttering; I don't waste time and effort for one-off tasks.

not needing to rely on idioms

I don't "need to rely" on idioms; I choose to make use of idioms.

Have you ever watched a professional cook peel & slice or dice an onion? The skin is removed in one or two seconds; the slice and dice is done with a stupifyingly fast knife action. Contrast that to a beginner performing the same task.

In the isolation of a TV cookery program or demo, the professional's actions may be seen as a 'neat trick'; or 'a bit of flash'. But in the context of the professional kitchen where onions are prepared in quantities measured in 10 kilo sacks; the speed is a necessity.

Likewise, it behooves the professional programmer to learn and use the idioms of his chosen language.

And the more of the idioms you master, the more often you'll see the one-line solution to what might otherwise be a week long programming task.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


In reply to Re^5: Get me excited about perl by BrowserUk
in thread Get me excited about perl by jatill

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (6)
    As of 2014-10-02 03:30 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      What is your favourite meta-syntactic variable name?














      Results (45 votes), past polls