With Perl, I'd say just write the most understandable and maintainable code you can.

It may surprise some here that I wholeheartedly agree with this statement.

The problem comes with defining the target audience, and what they will find understandable.

I personally find $DEBUG or ...; eminently readable; ditto  ... unless <cond>; and  ... until <cond>; where the condition is more accurately or clearly expressed in the negative.

But there are whole chunks of the IT community who have never used Perl -- and seemingly a large part of Perl community -- for whom these constructs are somehow 'difficult to read'.

Many seem to think that if not ...; is somehow *always* more natural or clearer than ...unless...; which I find bewildering. Contrast:

And then there are those that suggest that I should not write for me (or those with my level of Perl); but rather for those new to Perl, or perhaps those for whom English is not their first language, or those who are complete newbies to the world of programming.

To which my response is: if we all write all of our code as if the target audience are newbies; then they will never grow as programmers, because they are never stretched to learn new stuff; and we will never grow as programmers because we are ham-strung into targeting the least common denominator; and programming languages will never grow because no one is allowed to utilise their full feature set.

To me: dumbing-down our code, because someone, somewhere may not understand it -- or is too lazy to update their skills in order to understand it -- is the stupidest idea to plague the IT business (in a field full of stupid ideas), in the last 30 years. It is the equivalent of doctors resisting antibiotics in favour of leeches.


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". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^6: next unless condition by BrowserUk
in thread next unless condition by hankcoder

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.