6 ms·
Routinely I see in numerous online discussions that people refuse to even consider Perl 6 because they hate Perl. Or there are younger people who think of Perl
by dkarl 7y ago
Routinely I see in numerous online discussions that people refuse to even consider Perl 6 because they hate Perl. Or there are younger people who think of Perl as "their grandfather's language" (in much the same way people in my generation view COBOL).
I am not a fan of Perl, but this feels tragic to me. Perl was so radically different. I remember being on Perlmonks way back in the day, and someone would post a question about why their code didn't work, and there would be dozens of people who could instantly, intuitively post a corrected version of the code, but then the poster would say "oh, shit, what was my code doing? and why does the correct code do something different?" and you'd be lucky if there was a single person (cough chromatic) who could explain it. And none of the Perl fans cared, because Perl made them extremely powerful and productive, and they could (almost always) confidently produce a line of Perl code that did what they wanted. The analogy to natural language carried further into practice than Larry Wall could have dreamed. Nobody worries that the difficulty of resolving linguistic conundrums impairs their ability to have a conversation, and the Perl ninjas in my company enjoyed a very close and chatty relationship with the systems they worked on.
I'm the opposite kind of person, who got sick to his stomach looking at a line of code like !#$foo->%_[] (note: not real Perl) not knowing why it worked, even if I wrote it and knew that it would work. Even now, I have a nagging fear that if I executed "!#$foo->%_[] (note: not real Perl)" it would print "Yes it is! Ha ha. Love, Larry" to the console. I can't stand that, so Perl was never for me, but I still hope that against all odds this long, drawn-out apparent deathbed scene turns out to be the middle of a successful convalescence.
- Grinnz 7y agoAs a Perl aficionado, thank you for this, it is rare that anyone who does not enjoy Perl will express a positive opinion for it.
- anthonybsd 7y agoI do not enjoy Perl, but I have a positive opinion of it :) I launched my career in the late 90s as a Perl/XS/CGI (later mod_perl) developer and have many fond memories of it. I also have seen enough cases of Perl codebase deterioration to acquire significant distaste for it as far as enterprise projects are concerned. I enjoy using it for one-liners and small scripts here and there because it's VI-like in terms of being ubiquitous. I just don't programming Perl in teams larger than 1. Makes sense?
- justinian 7y agoI haven't used Perl since writing CGI in the 90s, and I'm not a fan of the syntax among other things. But I'm great with regular expressions. It seems like everyone around me swears regexes are an impossible black magic, and so they think that I'm some epic level wizard. And I have Perl to thank for that.
- glofish 7y agoYou are not alone feeling that. Check out to paper titled "93% of Paint Splatters are Valid Perl Programs" https://famicol.in/sigbovik/ https://famicol.in/sigbovik/ "In this paper, we aim to answer a long-standing open problem in the programming languages community: is it possible to smear paint on the wall without creating valid Perl?"
- Dylan16807 7y agoExcept that the vast majority of those OCRs are just a series of letters. They all parse as "a variable name, that's it", and it's not even weird for that to be a valid line. It's the kind of joke that doesn't teach you anything, rather than the kind that does.
- glofish 7y agoI think there are a couple of neat examples there: lerzfijglpFiji-j -*? plus I learned about the "unquoted string" feature that is the reason why the joke works also, the writing is quite entertaining.
- Grinnz 7y agoIt's not so much a feature as how really old versions of Perl worked. Any program using strict doesn't allow it unless it's a known subroutine name, built-in or other symbol. Except in certain cases because back-compat is complicated.
- goto11 7y agoI learned that: the Perl program “ Illegal division by zero at/tmp/quine.pl line 1. ”, when saved in theappropriate location, outputs “ Illegaldivision by zero at /tmp/quine.plline 1.”
- btilly 7y agoI remember those days. As someone who instantly could explain it, I was sometimes lazy, but I just assumed that most of the people knew and were similarly lazy. Mind you at one point I was also the #2 poster on perlmonks...
- Qcombinator 7y agoAs just another Perl hacker, your "not real Perl" made me laugh. And no, let me reassure you that that snippet of line-noise is not, in fact, syntactically valid Perl after all. ...you have to transpose a couple of characters for that: cat nocarrier.pl !$#foo->_%[] perl -c nocarrier.pl nocarrier.pl syntax OK (And yes, that genuinely does make me love Perl a tiny bit more. I guess you and I are just different that way, and that's OK.)
- Ultimatt 7y ago$ perl6 -e '!$#foo->_%[]' ===SORRY!=== Error while compiling -e Unsupported use of $#foo variable; in Perl 6 please use @foo.end at -e:1 ------> !$#foo⏏->_%[]
- spiralx 7y ago> The analogy to natural language carried further into practice than Larry Wall could have dreamed. Over the years I've seen this mantra repeated a million times but I've yet to have anyone actually explain what it means beyond a piece of marketing fluff. What actually is this analogy in concrete terms?
- Qcombinator 7y agoA lot of languages — in fact, a lot of software in general — is designed to make things easy for the computer/programmer: "This is how it works and you just have to adapt, deal with it." Larry Wall put a lot of effort into making Perl try to adapt to the way the user already thinks instead, including taking advantage of having studied linguistics to figure out how the "language" part of a computer language fits (or doesn't fit) the way our brains process languages. The result was a language that has a lot of power and flexibility. People who like Perl tend to love it, because it fits like a tailor-made suit instead of all those off-the-rack languages. People who dislike Perl tend to hate it, because all that power and flexibility can be easily abused (even when you're trying not to — there's a reason so many people buy off the rack instead of making DIY suits). •https://bigthink.com/videos/why-perl-is-like-a-human-language https://bigthink.com/videos/why-perl-is-like-a-human-languag... •https://www.perl.com/pub/1999/03/pm.html/ https://www.perl.com/pub/1999/03/pm.html/ •https://www.perl.com/pub/2007/12/06/soto-11.html/ https://www.perl.com/pub/2007/12/06/soto-11.html/
- thaumaturgy 7y agoI think there's a greater underlying dichotomy here that's relevant to your tailor-made suit analogy: the people who love Perl tend to be the people who are building and maintaining mostly only their own tooling and (usually small) codebases, and the people who don't love Perl tend to be the ones that are responsible for maintaining large piles of other people's code. A language that's "tailor-made" for the individual is fantastic when you only have to deal with your own code. You get to write stuff that makes sense to you. It doesn't matter if it's unconventional or doesn't make sense to anyone else -- it fits the way that your brain works. But when cooperating on larger projects with lots of other people involved, this backfires remarkably. You now need to understand the way that half a dozen or more other brains work. As software development has gradually shifted away from the published efforts of lone hackers and towards the collaborative efforts of teams of specialized people, Perl's "TMTOWTDI" approach has made it a far more expensive language to develop software in than all of the alternatives.
- yoz-y 7y agoMy contention with people hating on perl was always that they mostly hated it because it was fashionable. Yes perl uses many special characters but reading perl without knowing it is no different from trying to parse OCaml or Haskell code without knowing all the lingo. Sadly, during my career I've actually never met a kindred perl loving soul.