One of the things you constantly do as a programmer is learning new things. In Perl, there's a lot to learn. Going from Perl Baby Talk to Idiomatic Perl is a long process in which one learns to express themselves well.

Other people reading your code and finding it difficult to read should not run screaming to you and complain about unreadable code. Instead, I think that they should ask you if the technique you used is a common idiom in Perl. If yes, they should master the idiom themselves and possibly teach others too. Mind you, bad code is bad code, but there are many short, fast and elegant Perl solutions which are not immediately obvious, but on closer inspection, are very valuable things to know.

Python, which is praised as an easy-to-read language, has a number of idioms. I'd be hard-pressed to believe that someone's first encounter with, for example, list comprehensions is going to be more successful than the Schwartzian Transform (Ok, maybe that's a little strong, but I'm sure you get my point :-).

I think that being a good programmer requires you to keep an open mind about things you don't know. Crying "I can't read this!" when a little more investigation shows that it's a very elegant solution is not my idea of keeping an open mind.

--
All that is gold does not glitter...


In reply to Re: Idioms considered harmful by Aragorn
in thread Idioms considered harmful by rinceWind

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.