3 ms·
Well, I can tell you what's the use of learning Perl 5 and that I suspect most of it will apply to Perl 6 as well: Perl, more than any other language I know, s
by krylon 11y ago
Well, I can tell you what's the use of learning Perl 5 and that I suspect most of it will apply to Perl 6 as well:
Perl, more than any other language I know, sacrifices nearly every other property in the name of being useful. It's not a conceptually clean language, or an elegant one, or a simple one, but if you need to get stuff done, now, there is very little that can compete with it.
(At least for some rather specific values of "stuff" - Perl, IMHO, really shines at small-ish scripts that need to convert data from some format to another, or merge data from different sources, especialy when lots of text-handling are involved). Parsing a log file, or matching user accounts from a Windows domain with employee records in an ERP system's database are two examples that come to mind because I had to do those things not too long ago.)
Perl 5 has problems though, especially when it comes to writing large-ish programs. While you can write readable und unreadable code in any language, Perl makes writing unreadable, unmaintainable code easier than, say, Python. Perl 6 tries to fix a lot of this while remaining as useful as Perl 5 (or at least trying to).
- username223 11y ago> Perl, more than any other language I know, sacrifices nearly every other property in the name of being useful. Another factor that mattered back during Perl's heyday was the insane lengths it went to for maximum portability. The Perl porters shouldered the burden of making it run on DOS/Windows, Mac OS, VMS, and all the weird Unices that existed at the time. This doesn't matter as much nowadays, but it was crucial back then. If you had a text-munging or scripting problem, and wanted to solve it once and for all, Perl was the perfect tool.
- krylon 11y agoOh yes. The Perl documentations comes with things like perlos400 or perlvms that details the specific problems or advantages people looking to run Perl on that particular platform will face, and the list of these OS-specific documents is really impressive. There are systems on it that run Perl that I have never heard of (or only in whispering, at a New Moon). Perl lets you pretend that Windows know how to fork. That alone still amazes me in a way. During my training, I had to set up BIND 9 on IBM mainframes running z/OS and configure TSIG (cryptographically verified zone transfers), which among other things required changing the (shared) keys on a regular basis (about once per month, I think) and distributing them across about half a dozen systems. Fortunately, at that precise point in time, I stumble across a news headline that IBM just released Perl 5.8 for z/OS and managed to get the sysprog to install it. The alternative would have been REXX. I looked at it, quickly, and then looked away, very determinedly. I was really glad Perl was available on those machines.
- ribasushi 11y agoFWIW perl currently builds and passes tests on z/OS, under straight EBCDIC: http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/msg232907.html http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/ms...
- username223 11y agoAnd this is why Perl is awesome: IBM mainframes are the opposite of sexy, but some people use them, and Perl will work there.
- athenot 11y agoA lot of that has to do with Perl being multi-paradigm. C++ is another (though lower-level) example of that. On the one hand, there's a strong argument in favor of designing a "clean" paradigm and sticking to it. On the other hand, there's an equally strong argument to "pick the right paradigm for the task". It's taken me many years to appreciate the elegance in that approach, as it requires a thinking in multiple models at the same time. On a totally subjective note, I find it more "human" as our creativity lets us what's suitable for the task, without trying to mold everything into the same uniform mold. That may appeal to certain personalities more than others.
- mundanevoice 11y agoIt all sounds good but I can do almost everything in Python too right? That too with the cleaner syntax and easy to debug/read code. I hardly see any job openings that requires perl these days unless it's for some legacy Perl project.