in reply to Opinion: where Perl5 wasn't attractive for me

As many have already stated: your "expectation" does not match. That is no reason to state that either your expectation or the language (perl, C, java, PHP, Python, assembler, Cobol, Fortran, Basic, Forth, ...) is wrong.

Your expectation has grown out of your experience with other languages. Those languages have made design decisions that differ from most of the design decisions made in any of the other languages. If all used the same reasoning, there would only be one language :)

What currently sound non-sensical or illogical to you at first glance, might be superduperlogical when you understand *why* it works like it does and what power you can get in using it the way it does.

The beauty/ugliness is withing the eyes of the beholder. There are as many styles and layouts as there are people willing to dispute whatever other style. Perl5 is known to allow a lot of styles and structures. The main reason is that perl was designed by a linguist, and not a compiler-designer or somesuch. The fact the your can write action() if expression; to mean exactly the same as expression and action (); is a fact that both attract programmers to the language (as it is easy to fit your coding to the way *your* brain works) as it chases people away (too many different possibilities to do the same thing). Obviously, I am in the first camp.

One gets used to the language most frequently used (in a period). I'm doing perl, java, and C. Do not count my curses when the C compiler failed compiling my code where I typed state $i = 1; instead of static int i = 1; (same for my etc).

Likefile I curse at java IDE's for deleting lines when I hit Ctrl-E expecting to scroll. An IDE is not (sadly) my fav editor. Speaking of which: flamewars have proven in the past that there is no editor that suits the needs of every single person that uses it.

So, there are for sure "things" in the perl language that may be counter-intuitive for you until you know why the specific feature acts like it does. For people coming from perl, it is exactly the same the other way round.

I value your first post, as it lists a basic set of expectations. Not that I agree to those expectations, but we all can learn from that list what *some* people might expect in any language. For some of those grunts, there are (very) easy solutions or workarounds, for others, you'll just have to accept that language X does not have the same syntax as language Y.

If you seriously take time to get over your initial griefs, I am sure you will see the beauty and grace of perl and learn to love the ease of use and the widely available off-the-shelf ready-for-use CPAN solutions.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Opinion: where Perl5 wasn't attractive for me
by locked_user sundialsvc4 (Abbot) on Nov 21, 2014 at 13:15 UTC

    There is zero doubt in my mind that CPAN is really “most, if not all,” of what the fuss is about, when it comes to Perl.   Every language has its contributed-library and its system for deploying it, but I believe that Perl’s CPAN is a best-of-breed resource.   It is comprehensive, extensive, and very thoroughly self-testing.   It is also “battle-proven.”

    The language itself is also well-implemented and remarkably flexible.   Consider, for example, that Moose is written in Perl-5, thus is compatible with Perl-5 and in fact allows you to switch back-and-forth between the two idioms within the compass of a single source-file, if you choose.   (And, on top of all that, it’s efficient.)   Nor is it the only version of itself ... there’s also Moo and many, many others.   I’m not coming-up offhand with any other language that’s actually capable of that.   Let alone in a way that you can, and do, put into production deployments.   Perl is no one’s toy.   Wanna haul serious freight for money?   Hitch up the train and let’s go.

    So, while I freely grant (from personal experience ...) that Perl will initially trigger a “WTF™ ...?!” reaction, perhaps especially among those with fewer notches yet carved into their pistol-grips, it is a language well worth getting to know, and getting to know well.   Whether or not you find it attractive.   (At first.   It grows on you.)   The saying that it is “The Swiss Army® Knife of pragmatic computer-programming” is not an idle quip.