note BrowserUk <blockquote><i>as a reply to a post which included C, C++, Java, Python and Haskell source code.</i></blockquote> <p>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. <p>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.) <p>Whilst I might have found equivalent examples on-line; I would not have been able to judge a good example from a bad. <blockquote><i>My point is that Perl is not unique in its ability to provide concise solutions to text processing problems.</i></blockquote> <p>I don't think I claimed it was "unique". <blockquote><i>The PHP solution is a little longer,</i></blockquote> <P>Actually, quite a lot longer. <blockquote><i>but is arguably more readable </i></blockquote> <p>One-liners aren't meant to be readable. (No one is going to be code reviewing my console history:) <p>Just as a carpenter doesn't use a dovetail joints for shuttering; I don't waste time and effort for one-off tasks. <blockquote><i>not needing to rely on idioms</i></blockquote> <p>I don't "need to rely" on idioms; I <i>choose to <b>make use</b> of idioms</i>. <p>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. <p>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. <p>Likewise, it behooves the professional programmer to learn and use the idioms of his chosen language. <P>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. <div class="pmsig"><div class="pmsig-171588"> <hr /> <font size=1 > <div>With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'</div> <div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div> <div>"Science is about questioning the status quo. Questioning authority". </div> <div>In the absence of evidence, opinion is indistinguishable from prejudice. <p align=right> [|RIP Neil Armstrong]</p></div> </font> </div></div> 994491 995565