A wise man once said:

To gain the benefits of Perl, programmers coming to it from a different language must learn and internalize idiomatic Perl programming style and technique. The same applies to programmers used to earlier and less expressive versions of Perl.

Thoughtlessly applying techniques effective in one language to another typically leads to awkward, poorly performing, and hard-to-maintain code. Such code is also most frustrating to write because every line of code and every compiler error message reminds the programmer that the language used differs from "the old language."

...except that he didn't say it quite like that. The statement above was written by Stroustrup, in The C++ Programming Language, 4th Edition.Except that everywhere you see Perl, his statement read "C++".

All of these bullet points enumerated in the top post of this thread are just annoyances or surprises to someone who comes to Perl from another language. And that entire class of issues pertains to anyone learning a new language when another language is more familiar. Such an individual will be frustrated until a similar comfort level is achieved in the new language.

For each of your bullet points, I encourage you to step back and ask yourself "Why is it that way?" Don't settle for "because". Investigate, and don't stop until you know the reason. There is a reasonable explanation for each of the points you raise. But you won't be convinced until you do your own investigation and realize, in each case, "Oooooh! I see." And when you do reach that stage, you'll be a better Perl programmer for your effort.

If, at any point, you reach a full understanding of the issues surrounding each of your bullet points, and still feel that there's a better solution, put it in a proof-of-concept module, upload to CPAN, and see if people like it. Fully researching a topic, and producing a better solution... that's progress. Knee-jerk reactions to constructs that you haven't taken the time to fully investigate will not produce a better Perl. Nor will they make you a better programmer.

(Update) Learning why a language works the way it does will make you a better programmer, whether it's Perl, Lisp... even PHP.


Dave


In reply to Re: Opinion: where Perl5 wasn't attractive for me by davido
in thread Opinion: where Perl5 wasn't attractive for me by rsFalse

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.