3 ms·
It's not about websites -- raw text is what Perl was made to handle. It really is the Swiss Army Chainsaw, the Duct Tape of the Internet -- I try never to use
by apathy 19y ago
It's not about websites -- raw text is what Perl was made to handle. It really is the Swiss Army Chainsaw, the Duct Tape of the Internet -- I try never to use Perl anymore, but when I need it, it's there, along with CPAN, calmly biding its time.
Perl is horrible, ugly, unclean, unmaintainable in the general case, inelegant (ahem accessing nested arrays by multiple index? ahem)... and in spite of all that, used sparingly and in the right situations, it cannot be beat.
CPAN is the key to Perl. Lots and lots of code that Just Works. Sometimes the elegant, bulletproof solution is not the best one -- sometimes the solution that takes 2 lines and 5 minutes is, in fact, the correct solution for the task at hand. And that latter task is whence Perl sprang. It also amply describes the chaos of the Interwebthingy from around 1994 to 2001.
Things are different now. Corporate-like. But in the beginning, it was the Wild West, and you used the sharpest tool you had handy. Perl was often that tool.
- kingkongrevenge 19y ago> Perl is horrible, ugly, unclean, unmaintainable in the general case, inelegant Bollocks. It has some bizarre vestigial organs and functional redundancies from its evolution, but so does every language. Sometimes it's easy to take concision too far, but you prefer the alternative of mandatory verbosity? Go look at some of the things people are doing with Moose and POE and try to claim inelegance.
- chaostheory 19y ago"It's not about websites" I only mentioned websites to be fair to Perl. "CPAN is the key to Perl. Lots and lots of code that Just Works." The problem with CPAN is that a lot of times the stuff on there only just works with certain platforms. Besides, with Google, the advantage of having a CPAN is neutralized.
- apathy 19y ago> with Google, the advantage of having a CPAN is neutralized. I could not disagree more strongly. Perl has CPAN, R has CRAN, Ruby has Gems... why does this pattern recur, over and over, in successful languages? Probably because it works. Someone is working on a problem, thinks "gee, I wonder if someone else has solved this in insert language here??" In some languages they get to head off on a wild goose chase via Google. In others, they type 'install Foo::Bar' or 'install.packages(fixMyProblem)' or whatever, and with luck, continue on their merry way, NOT switching contexts or handling an interrupt. From a programming perspective, THAT RULES. Google does not solve all problems, not by a long shot.
- snorkel 19y ago> Perl is horrible, ugly, unclean, unmaintainable in the general case, inelegant Depends on the coder. To me "maintainable code" == "readable code" == "self-documenting code" and that's very easy to achieve with Perl. Unfortunately most of the Perl found on the web and in Perl books set bad examples for those learning Perl such as abusing the default variable $_, abusing regex for simple string operations, using procedural code where an OO model would be more clear, abbreviating names of variables and functions to just a single letter, using Perl's obscure built-in parameters without explanation, and using all of the above to create obfuscated one-liners to perform complex tasks. All of these bad habits have spread like a virus into the habits of Perl coders and it takes time to break these habits. Unfortunately some shops think the answer to sloppy Perl code is to replace all Perl code with <my pet language> as if that will make everything better but instead the new code is just as unreadable because it encourages different kinds of bad habits. And I'm sorry to all you LISP fans here, and this may even get me banned from this web site, but hooray for you because you can emulate Google PageRank with 5 bytes of LISP code that throws the LISP interpreter into some obscure self-awareness mode that transcends human understanding but is that readable? Is that maintainable? Is that self-documenting? I don't think so. Yeah, that's cool you can do that but I'll stick with Perl, thanks.