| I don't think this is true. Have you ever read the code of a bigger Perl distribution. For example Mojolicious. https://github.com/kraih/mojo While I also like other languages and for example have great fun using CoffeeScript for my current projects Perl is really good when it comes to describing what the code actually does. This is a benefit of "there is more than one way to do it". At the beginning t is hard to understand this, if you come from other languages. There are lots of people writing C-like Perl code. It looks very static and usually extremely ugly. People see this stuff, for example in the documentation of various bindings, etc. and think "ugh, that's ugly". Perl (designed by a linguist) is much more dynamic, like a natural language. So it allows you to describe things in an hard or easier way. In fact Perl was my first real language and it took a while until I understood how others work. Meanwhile I know a number languages and have seen various ways in which you can design a language. I can see why many people shun Perl. However, the main reason possibly is that the don't understand what it's concepts are about. They are very different. One can possibly compare this with the situation when you switch to a functional language, like Haskell or when you haven't used OO before. Like with all languages I really recommend to learn it. Even, if you don't use it Perl _will_ widen your horizon. Two tips, if you do: Modern Perl, is probably the best book for learning and it's available as a free online book (wish I had something like that, when I started). There are many very outdated and even completely wrong tutorials. Oh and "use diagnostics;". It will take a while until you see it's flexibility, but it is like Perl would be a language inherit (or assimilate) all paradigms and concepts or like always had them and they were just slumbering. Well, of course there are other things like CPAN that make Perl great. Yeah, other languages have similar facilities, but they don't come close. It is really great and they all have lots of tests and there are a lot of "CPAN Testers" that report problem. And when you want portability you'll love it. It runs on _very_ exotic platforms. |
"There's more than one way to do it" is, for me, a negative, at least in the Perl implementation of it; while there are cases where multiple ways to do the same thing is great (for example, C#'s foreach versus the IEnumerable extension method that takes a delegate/lambda), I don't think that's the case here. The pathological decisions toward terseness are, in my experience, the root cause of one guy's Perl being unreadable to the next; this may be a cynical statement, but (said with tongue firmly in cheek) when you give a programming language capable of expressing significant logic with one character, the guy who uses vim will do so, and damn the next guy who has to pick it up and work with it later.
Say what you will about something like Java--and oh man, have I said all of it--but the language does tend toward readability (at the cost of boilerplate); it's relatively hard to write correct code that will elicit WTFs from the next guy who has to maintain it. In my experience, WTFs are somewhat par for the course with inherited Perl.
(I find Python to generally encourage the Right Thing as well, though it's easier to write monstrosities in that, too, than I would really like. C#, for me, hits the sweet spot, but doesn't exactly work so well as a scripting language.)
None of this should be construed to say that you cannot write clean Perl. Surely you can, and I've certainly encountered some of it. But I think "there's more than one way to do it" is more of a crutch for "write byte vomit, it'll just work" than you'd like to admit.