85 ms·
On the Decline of Perl – external factors
- codesnik 6y agoI started to make money writing in perl when it was long on decline already, in 2005-2007. I've switched to ruby after that. It's not widely known, but perl had a lot of influence on ruby, in much cleaner syntax and without baggage of text-only-processing scripts of early 1980-es
- mattm 6y agoI view Ruby as basically the OO-version of Perl.
- tzmudzin 6y agoIMHO the biggest issue that blocked Perl's broader adoption was the really obfuscated handling of nested data structures including objects. Anything beyond array of arrays or hash of hashes was a pain. It was and it still is way superior to Python for hacking of flat files, but once you needed to go beyond a hash the pain was real. That was 20+ years ago, and Python filled this space with its easy definition of classes and candy syntax. Where Perl overdid on hackery, Python may have overdone on sugar -- but it clearly won the love of the masses. Now, 25 years later, the ship has probably sailed for Perl, and -- while I still prefer it to sed/grep/awk and Python for simpler tasks, I don't see it conquering Python space for more complicated processing.
- Tepix 6y agoI think they lost it with Perl 6. Perl 6 was a bit late, but it could have been a better rejuvenation for Perl than Python 3 was for Python. Instead it took way too long, had confusing naming with the various implementations and frankly some features that are not very useful for anyone but linguists. I mean, why would you want to redefine your language from within the language? To confuse your co-workers? To win the obfuscated perl contest? Perl 6 also has some real innovation like its new regular expressions. I'm afraid they will never get widely adopted. FWIW i never had a problem with nested data structures in perl. I found the perl documentation ("perldoc perldata") to be fantastic.
- lizmat 6y agoPlease note that Perl 6 is no longer a thing: it has been renamed to the Raku Programming Language (https://raku.org https://raku.org). If you want to stay up-to-date, you can check out the Rakudo Weekly News at https://rakudoweekly.blog https://rakudoweekly.blog
- arglebargle69 6y agoThis is precisely the problem
- tsjq 6y agoHahaa. So true
- kqr 6y agoThis was the problem. It's now been fixed. Or do you think Perl 6 was the more meaningful name?
- znpy 6y agoEh, it sorta still is? Not really, but if you spent ten years announcing an upcoming perl6, then you rename it to Raku... There will be confusion, at least.
- emodendroket 6y agoNot just confusion. If you hype it up as the future and then drop it how excited are people really going to get for the old stuff?
- lizmat 6y agoPerl 6 was released in December 2015. A little under 4 years later, it was renamed to Raku. Plenty of time to not be confused.
- DonHopkins 6y ago
- stinos 6y agoWhere Perl overdid on hackery, Python may have overdone on sugar Haven't used Perl often, but that's sort of my impression as well. And that Python sugar feels mostly pretty well reasoned about. And fairly usable and readable as well. Whereas in Perl I sometimes had the impression a bunch of people with CS degrees made something they thought out while on LSD and just decided to add it. Cool at the moment, but not too usable by sober minds afterwards.
- kqr 6y agoAs you probably know, contrary to almost every other language out there, Perl was not designed by people with CS degrees adding things that sound cool. Perl was designed by a linguist along the principles of "what would English look like if it was a programming language?" Not in the superficial syntactic sense, but the underlying grammar. What is the implicit "it"? What can we derive from context and decision so we don't have to spell it out? And so on. This makes it very convenient to express common things in different ways (just like English, there is no one true way to say something) but it also creates some peculiar constructs that make sense but you'd go "who says this?" (again, much like in English.)
- DonHopkins 6y agoOk, then if not actually designed under the influence of LSD, then certainly under the influence of religious fanaticism. The tired old "Perl was designed by a linguist" cliché is endlessly Parroted (pardon the pun!), but doesn't actually necessitate or imply good programming language design. But look at the actual factual source of that folklore -- it would be more accurate to say "Perl was designed by a wanna-be missionary", and that certainly shows ("Exegesis", "Apocalypse", "bless", etc): https://en.wikipedia.org/wiki/Larry_Wall https://en.wikipedia.org/wiki/Larry_Wall >While in graduate school at the University of California, Berkeley, Wall and his wife were studying linguistics with the intention of finding an unwritten language, perhaps in Africa, and creating a writing system for it. They would then use this new writing system to translate various texts into the language, among them the Bible. Due to health reasons these plans were cancelled, and they remained in the United States, where Wall instead joined the NASA Jet Propulsion Laboratory after he finished graduate school. Wall is an active member of the New Life, Church of the Nazarene. Going on a missionary expedition in Africa to invent and teach illiterate people of color a written language to read the Bible in certainly sounds to me more like religious and linguistic imperialism than a sound motivation for programming language design. https://en.wikipedia.org/wiki/Linguistic_imperialism https://en.wikipedia.org/wiki/Linguistic_imperialism >Linguistic imperialism or language imperialism is occasionally defined as "the transfer of a dominant language to other people". This language "transfer" (or rather unilateral imposition) comes about because of imperialism. The transfer is considered to be a sign of power; traditionally military power but also, in the modern world, economic power. Aspects of the dominant culture are usually transferred along with the language. Translating CS literary classics like the "Pascal Users Manual and Report" and Anders Hejlsberg's "Turbo Pascal Reference Manual", or even textbooks about sustainable farming techniques, nutrition, medicine, sex ed, and birth control, into their invented written language would do more economic and life sustaining good for those poor Africans than translating the Bible. kqr> "people with CS degrees adding things that sound cool" People with CS degrees add cool things that are sound, not things that sound cool. Do you really believe that programming languages should be intentionally designed to be MORE like religions, MORE imperialistic, MORE evangelical, instead of less? Compare Larry Wall's contributions to this otherwise deep fascinating conversation about language design, versus the contributions of less religiously motivated, more scientifically trained programming language creators with CS degrees, like Guido van Rossum, James Gosling, and Anders Hejlsberg: A Language Creators' Conversation: Guido van Rossum, James Gosling, Larry Wall & Anders Hejlsberg https://news.ycombinator.com/item?id=19568378 https://news.ycombinator.com/item?id=19568378 https://www.youtube.com/watch?v=csL8DLXGNlU&t=49m41s https://www.youtube.com/watch?v=csL8DLXGNlU&t=49m41s James was literally taken aback by Larry's macho IDE shaming: https://news.ycombinator.com/item?id=19568381 https://news.ycombinator.com/item?id=19568381 "I think IDEs make language developers lazy." -Larry Wall "IDEs let me get a lot more done a lot faster. I mean I'm not -- I -- I -- I -- I -- I'm really not into proving my manhood. I'm into getting things done." -James Gosling
- cafard 6y agoThe last real job I did with Perl was just over nine years ago. HTML::TreeBuilder saved just hours, probably weeks, of frustrating work during a web platform transition. I think that you are right about the nested data structures. I was favorably impressed by the little I saw of Moose, but by the time that came along, all the young seemed to know Python and not Perl. It is not just flat files Perl handles nicely, either. One can do fixed-format munging in Python via the struct module, but I've never found it as handy as Perl's pack/unpack, something I used as far back as the Perl 4 days.
- arunix 6y agoWhat does "really obfuscated handling of nested data structures" mean? Can you give an example?
- luckylion 6y agoProbably dereferencing, since Perl never had multidimensional datastructures. You'd put a reference to an array into an array value, and then access it with $array[0]->[0] (iirc) to get the first value of the first array. That was the easy way to write it, the much more annoying way was like ${$array[0]}[0] (or $$array[0][0] if you really wanted to? my memory is fortunately fading), I believe, which got really out of hand when you went three or more levels deep.
- kqr 6y agoThe syntax for accessing nested indices actually automatically resolves references the way you'd expect. So for the specific case of accessing a single deeply nested value, no special incantation is needed.
- tyingq 6y agoPerl has sigils for different data types. $foo="bar"; #scalar/string %hash = { "key" => "value", "key2" => "val2" }; #hashmap @arr = ( 1, 2, "three", 4); #array But, it also has references, like pointers. $array_ref=\@somearray; # array ref $hash_ref=\%somehash; # hash ref $scalar_ref=\$some_scalar; # scalar ref So, you can put scalars into arrays and hashes, refs into hashes and arrays, etc, etc. At whatever nested depth you want. But you have to extract pieces later. And Perl, as usual, allows a zillion ways to do it. These are all exactly the same thing: $$arrayref[0] = "data"; ${$arrayref}[0] = "data"; $arrayref->[0] = "data"; So imagine you need to extract a string that's at the bottom of some data structure. Here's an example: @IP = ('192.168.1.10','192.168.1.15'); @PORT = ("5000","5002"); @TCP = ("Q931","H225","H245"); @LAYER = ("ETHERNET","IP",\@TCP); @PKT = ( \@IP, \@PORT, \@LAYER ); $array_ref = \@PKT; I can extract something using different approaches, like: ${${${$array_ref}[2]}[2]}[1];# oof! # same result, looks better, but imagine # we put a hash in the data structure, or # had deeper structures $array_ref->[2]->[2]->[1];
- u801e 6y ago> IMHO the biggest issue that blocked Perl's broader adoption was the really obfuscated handling of nested data structures including objects. Anything beyond array of arrays or hash of hashes was a pain. How was it a pain specifically? If you used references, then defining an arbitrary data structure shouldn't be an issue and accessing individual elements would be a matter of prefixing the reference with the appropriate sigil. In python, you need to be aware of when you're making a copy of an element in a data structure rather than getting a reference of that element. In perl, you would know based on syntax whether you're dealing with a reference as opposed to a copy of an instance.
- HeckFeck 6y ago> In perl, you would know based on syntax whether you're dealing with a reference as opposed to a copy of an instance. Once you 'get' the sigils in Perl, you miss them everywhere else.
- gh-throw 6y agoThey're kinda just a barely-there static-typing system, but damned if that's not way better than none. And if one recalls that monochrome screens used to be a thing, and that syntax highlighting was wonky (because shortcutted to be usable on weak hardware) and/or too computationally expensive for computers for a while after that, one really understands the appeal of the sigils. Perl is one of the most notepad-friendly languages around. PHP's weird half-assed copy of the sigil system ($ only, for everything) is one of my least-favorite things about it (but I don't really hate PHP the way some people do, so that may not be saying much). $, %, and @ are why using complex multi-dimensional arrays & associative arrays in Perl is non-crazymaking. You can at least state the kind of thing you're intending to use at each layer of the array, and have that intention readable even when syntax highlighting isn't available, which is a lot better than nothing.
- hnfong 6y agoIsn't that just a half-assed mandatory Hungarian-notation system? :-/ I mean, sure, in Perl the language "casts" the value into an appropriate type for you, but only in a few select cases..
- marbu 6y agoThe issue with nested structures is a good point. Another problem I noticed would be natural language like syntax sugar, which makes it harder to maintain your knowledge of the language if you don't use it regularly. I learned some perl long time ago during one project, and after I stopped working with the project, I also gradually stopped using perl for quick scripts, and settled on sed/grep/awk again for quick simple stuff, and python for the other tasks.
- deleted 6y ago[deleted]
- andi999 6y agoTo me it was the documentation. Whenever I tried to get into it, I only came across books/tutorials(I dont remember) which start with, oh pearl, here are regular expressions. And then a very very unstructured heuristical explanation of regular expressions. Usually gave up at that point.
- p0nce 6y agoExactly. Perl is hardly readable, difficult to understand, and simple things (like parsing a XML) becomes difficult in Perl.
- daotoad 6y agoHow were you parsing XML? I've never found it to be a difficult task. XML::LibXML is a nice wrapper around libXML. XML::Twig is great if you need to process huge files. XML::Rabbit will seamlessly map your XML into objects. There are things to criticise Perl for, like idiosyncratic argument handling in subroutines or the use of weird punctuation variables, but to call out XML parsing as particularly hard is questionable. Take a look at this example from https://grantm.github.io/perl-libxml-by-example/basics.html https://grantm.github.io/perl-libxml-by-example/basics.html use XML::LibXML; my $filename = 'playlist.xml'; my $dom = XML::LibXML->load_xml(location => $filename); foreach my $title ($dom->findnodes('/playlist/movie/title')) { say $title->to_literal(); } How is that particularly difficult?
- Diederich 6y ago> really obfuscated handling of nested data structures including objects Can you expand on that a bit? Are you talking about how Perl5's variable sigils?
- spookthesunset 6y ago> IMHO the biggest issue that blocked Perl's broader adoption was the really obfuscated handling of nested data structures including objects Oh man did we ever abuse the shit out of the loosy-goosy data structures you could make in perl. Almost any time you needed to debug or trace something, you'd pretty print the entire data structure you were passing around. Some of those suckers would be huge and you'd be passing that structure around to almost everything in your codebase! As an outsider it might appear scary and a massive code smell... but when you worked on that codebase it just kinda all made sense somehow. It was just how perl programs rolled. I have yet to work in any other language that let you use and abuse the native data structures quite like you could in Perl.
- Tepix 6y agoThe linked page is down for me. Here are alternative links to the same emails by Paul "LeoNerd" Evans external factors email https://marc.info/?l=perl5-porters&m=161688954811345&w=2 https://marc.info/?l=perl5-porters&m=161688954811345&w=2 internal factors email https://marc.info/?l=perl5-porters&m=161688963311406&w=2 https://marc.info/?l=perl5-porters&m=161688963311406&w=2
- cafard 6y agoThank you for the working link.
- danjac 6y agoOdd that there's no mention of PHP: many developers who used Perl/CGI back in the early days of server side development moved to PHP and PHP was much easier for beginners, especially if you wanted to incrementally move from a static to dynamic site. Perl was, in its day, as much the king of web development as it was admin scripting.
- luckylion 6y agoIt's not just that it was easier, it also ran everywhere, was fast (with mod_php), did not require chmod'ing files on the server, did work even if you uploaded the file with windows line breaks, had parameter parsing and sessions built in. It was pretty quickly superior to Perl for web-stuff in my opinion.
- jrwr 6y agoI still like it for CRUD apps and below. you really can't beat just being able to take a plain HTML file and throw a few <?php foreach($array as $row){ ?> in the middle of it as a quick and dirty web app it feels much more useful then anything else.
- oaiey 6y agoI moved from ASP to PHP and then soonish 20 years of C#. When I see or code PHP nowadays, I still feel welcome and understand all of it. Kudos to the PHP team for that.
- endemic 6y agoI tried really hard to learn Perl/CGI as a young'un, but it wasn't until I tried PHP that web programming "clicked" for me.
- chrisseaton 6y agoI think what changed was that when Perl was popular people were generally a bit more into lots of wacky way to do the same thing, deliberately whimsical terminology, puns in their programs, the program equivalent of creative writing, and being a bit different for the sake of it. I think I had a Perl book at the time that tried to make a serious case for Perl programs being poetry. I think the culture has just changed since then and most people aren't into that any more. People now seem to value one clearer way to do everything, and more straightforward terminology. Look at the popularity of much more no-nonsense languages these days. I think unfortunately Perl just now looks deeply unfashionable, and I think even the context of why it is the way it is and how people saw things back then has sort of been lost so it's somewhat hard to explain to younger people in the community.
- emodendroket 6y agoNot really a mystery why though, is it? Cute and novel ways to do things are less charming when you’re trying to figure out what earth they do well after the fact to solve some problem.
- jiofih 6y agoI’ve heard this a few times but never really saw any of that creative culture working close to a few Perl folks, besides a few funny package names. More a culture of roughness, “hacker cred” and a defensive, short-sighted, we-know-better attitude that left people stranded and is totally not welcoming to creative types. I learned very little during this time. What you describe is what the Ruby community was in the early 2000s.
- chrisseaton 6y agoMy favourite example is the 'bless' function. It attaches a class to an object, if people didn't know. I can't imagine such a name getting approved in any other language. I think any other community would say 'hang on shall we give it a descriptive name that anyone can understand without context, rather than doing this whole faux-religion schtick that will need to be explained to everyone?'
- bluenose69 6y agoPerhaps my experience with Perl is similar to that of others who have been programming since the 1970s. I loved Perl back in the day, when it seemed like a great alternative to constructing unix pipelines of awk, sed, etc. Although I mostly used Perl for interactive use, I also found it helpful for quite a few short programs, say in the 20 to 200 loc category. But I noticed a problem: these programs were tricky to understand a year later. Perl was still useful, mind you, but just not as pleasant at the edit stage as it was at the writing stage. And then Python came along. It soon became clear that Python programs would "age well". For quite a while, Python and Perl coexisted in my toolbox. And then Perl started to drift into it's present state. All the new goodness (and I'm sure it is good) just seemed to come at a cost of more complexity. But why should I learn the new way of doing Perl, when Python was already filling the gap for that sort of work? Gradually, my use of Perl decreased, from every hour to every week, to ... well, never. I wish Perl had just gone into bug-fix mode long ago, so that it could have remained a reliable and understandable tool for a certain set of tasks. And then I'd still use it for pipelines, as I use awk, sed and the rest.
- kqr 6y agoI started with Perl and Python much later (mid-to-late-2000s) and my experience is the opposite. Python programs aged horribly (just after 6 months it could be a half day's work to get the build working locally again) whereas with Perl programs, written correctly with plenty of tests, I could jump into them two years later and everything just worked exactly as where I left it off. I'm sure python has had several improvements in this regard since, but it just seems to me like it comes at a cost of more complexity (virtualenvs and whatnot.)
- ghshephard 6y agoI think the OP was referring to the readability of the code, versus the build pipeline. I'd have to agree with them - I could never understand my own Perl code 6 months after I had written it, whereas I have little difficulty reading anybody's Python code.
- bonzini 6y ago
- emodendroket 6y agoThe obvious answer to me is that the drawn-out, confused, ultimately abortive transition to Perl 6 sucked all the energy out of the ecosystem and it fell behind. Awkward support for OOP and the whole manual reference thing also probably didn’t help. Ruby in a lot of ways seems like a more modern language that is similar to Perl.
- zeckalpha 6y agoPerhaps a port of reticulate from R to Perl would allow Perl to get at least as many bindings as Python but allow it to keep its blue spoons? https://cran.r-project.org/web/packages/reticulate/index.html https://cran.r-project.org/web/packages/reticulate/index.htm...
- jiofih 6y ago503, inability to handle common web workloads might be one factor /s
- xaduha 6y agoThat whole mug throwing incident did Perl no favors. They needed to continue competing with PHP and Python at the time with full focus, not start gazing into the future of computing.
- mcherm 6y agoYes, the color of the spoon DOES matter. In fact, the color of the spoon (the syntax and expressiveness of the language) is probably why Python won out over Perl; it is certainly why I switched somewhere in the late 90s. Also... If your niche language isn't well supported by those who build language bindings for libraries and systems, fix that by making it extremely easy to create language bindings. If building a Python-to-Your-Language bridge is the only way to achieve this (it isn't) then build that.
- gillesjacobs 6y agoPerl was my first programming language, however ill-advised, it was what my computational linguistics professors used in 2012. It was a trial-by-fire implementing new modules in a codebase written by a seasoned Perl programmer who didn't shy away from its esoteric features. Having mostly moved to Python, I can't say I miss the whackiness of the language.
- azangru 6y agoHaving started with more modern scripting languages, such as ruby, javascript, or python, every time I touched perl I felt it was actively fighting me. Those sigils! God, those sigils! It's bad enough that we have to prefix variable names with a dollar sign in php, as if a language parser can't be smart enough to figure out whether you mean a variable or not; but having to use three different sigils for scalar variable, array variable and hash variable, and needing to know when to refer to the same variable with the array sigil or the scalar sigil — this is just vile. Things like $_ or @_ didn't help either. Probably people who took up perl after something even more adversarial can learn to love it. I doubt I ever can. What I did love about perl though — something I don't find in modern languages — is its carefree playfulness, which must have stemmed from the hacker culture associated with it. I still chuckle every time I use Carp for debugging. Carp::croak, Carp::confess, or Carp::cluck are genius!
- dmingod666 6y agoI worked on and off on perl for about a year... Could never remember $_ and @_ which one was which..
- kbd 6y ago$calar, @rray is a mnemonic for the sigils.
- singingfish 6y agoThe sigils are a feature that underpin perl's roots from practical linguistics (unlike other languages which have roots in theoretical linguistics). $ - > the value of @ - > the values of % -> the collection of key value pairs $_ is pronounced "it". @_ is pronounced "them". Don't use either of them except if it would make sense in english - e.g. you wouldn't refer to "it" in anything more than a sentence, so don't use $_ in anything longer than a couple of lines of code
- azangru 6y ago> The sigils are a feature that underpin perl's roots from practical linguistics I am not sure this metaphor makes sense to me. Imagine that I have a pack of dogs. When I use a language to say: "Remember that pack of dogs that I mentioned previously? Go ahead and give it to me" — I do not expect to also need to specify whether I want the pack with all the dogs in it, or whether I just want some value associated with that pack, which, if I remember perl's behaviour here, would be its length. I could understand if a language wanted me to specify whether I want the thing itself as opposed to a reference to the thing (I suppose it would make total sense as a Saussurian opposition of a signifier vs the signified); but the ternary opposition that perl enforces is neither here nor there linguistically — it's just bizarre.
- cryptos 6y agoFor me Python is a more ergonomic language. It is easier to read and write. And that led to a sustained growth of Python. Python's popularity exploded in recent years due to data analytics tools using that language, but there was a reason why these tools did choose Python in the first place ...
- AzzieElbab 6y agoDon’t be fooled by the 503 this site is returning, it is actually valid Perl code
- mybrid 6y agoI think the author is way to generous to the PERL community and the drama of PERL 6. I think the toxicity that eventually led to Larry Wall bowing out is being replicated in Python and Guido leaving. I left PERL for Python in the mid-2000s because it was clear with the Parrot engine and other misguided notions by the PERL bullies that the PERL leadership was bent. Now that Guido is out it will be interesting to see how long Python retains its perch. I think the demise of PERL would have been vastly different if Larry Wall hadn't been forced out.
- avar 6y agoLarry Wall wasn't forced out of Perl development. He decided on his own to stop actively contributing to Perl 5 sometime before 2000 and to hand it off to others. The whole Perl 6 v.s. Perl 5 branding was a source of friction, but as far as I know the rebranding of Perl 6 to Raku wasn't in any way because Larry was forced to do something. The two communities eventually decided that sharing the same name for two completely different languages didn't make any sense.
- lelanthran 6y agoThat may have played a part, but I feel that a larger problem was the line-noise-like syntax. Right now C++ and Rust appear to be competing to be the next Perl WRT hieroglyphics in code. The smug and pointless answer to the complaint that the code looks like line-noise is usually "whichever language you use, you have to learn the symbols anyway".
- warpspin 6y agoOne of the factors which lead to Perl's decline is there are too many ways to do it :-) This is fine for a lot of stuff, but somewhere in the 2000s, it became increasingly annoying you could not properly use Perl's biggest value up to that time, CPAN, anymore, because when you brought in 5 dependencies, you ultimately had 5 different object systems, 15 type validator libraries, 5 different time libraries and probably 20 different exception systems in your project, all happily eating away at your memory and your sanity. This is still a major problem today, where you basically cannot pull anything from CPAN anymore without the smallest package requiring a different fat object system. A lot could have been avoided by early on building a proper standard library delivered with the language, but instead at that time Perl delivered a lot of obsolete cruft, simply because it always was part of Perl, instead of real basics. That's at least my take on things. Though of course, npm proves many people do not give a damn about overly long dependency lists, so maybe it's just what I personally dislike about the direction Perl has taken.
- pansa2 6y ago> 5 different object systems This is an issue in Lua as well. The language is unopinionated and designed to offer “mechanism, not policy”, meaning you can design your own object system based on the language-provided primitives. The problem is that everyone does design their own object system - and they’re all different, with no interoperability.
- daotoad 6y agoThis was a huge pain in the neck. The rise of Moo/se has helped somewhat. Back in the day there was that horrible trend of using "inside out" objects that would let you reliably subclass something without knowing it's underlying module system. Ovid's Cor project has some really great work on specifying a default OO sytem for Perl 5 (or maybe 7). https://github.com/Ovid/Cor/wiki https://github.com/Ovid/Cor/wiki
- deleted 6y ago[deleted]
- Glavnokoman 6y agoExternal factors?!?! C'mon, admit it is just a terrible language.
- dmingod666 6y agoThere were 2 mails, one external and one internal.
- shagie 6y agoFor reference - the internal factors post is https://www.nntp.perl.org/group/perl.perl5.porters/2021/03/msg259485.html https://www.nntp.perl.org/group/perl.perl5.porters/2021/03/m...
- mixologic 6y agoI feel like the old Perl saying "There's more than one way to do it" Is what makes Perl a powerful tool for an individual, and an impediment to progress in an organization. It's possible to be expressive enough in perl that your colleagues cant really fully understand what it is you're trying to accomplish.
- gerikson 6y agoI agree (as a Perl fan). There's never any debate over what's "idiomatic" Perl. It's as idiomatic as you want it to be!
- lelanthran 6y ago> I feel like the old Perl saying "There's more than one way to do it" And every Perl developer took that as a personal challenge to find and use all the ways in a single program :-)
- ii550 6y agoLarry Wall's homepage color might be another non-insignificant factor :D www.wall.org/~larry
- sleepysysadmin 6y ago>Stepping outside the Perlish echochamber for a moment I'm surprised. Many people can't do this. Honestly haven't seen any perl since a hackthebox machine before covid where you compromise a user with a perl shell. >In practice, Python has snowballed simply because of network effect. Everyone knows Python so everyone uses it so everyone new has to learn it. I would interject and suggest this is incorrect. Python has 1 thing that Perl does not. ‘{‘ and ‘}’ and ‘;’ and $`’, ‘$&’ Clearly unnecessary. Python simply does it better. By that simple reality Perl is doomed to death. >Does the colour of the spoon really matter that much, or is it simply that everyone wants the same colour, regardless of what it is? Do we want to throw away what makes our blue spoons distinctive blue colour just to get in with the "in" crowd, even though we don't actually like green? This is a very bad analogy. It's making the assumption that all spoons are equally effective. Syntax alone the green spoons are green spoons but Perl's blue spoons have a different handle, 1 with spikes that may hurt you. Why do people use the green spoons? They have scars on the hands from the spikes.
- goto11 6y agoI tried to figure out how to do object oriented programming in Perl but got stuck at "an object is a thingy which contains a reference to itself" ...and apparently you had to "bless" that reference? Then I discovered Python and haven't looked back.
- wazoox 6y agoI've made a presentation on this very subject to a hackers conference in 2013. It's very clear to me, it's because of Perl6. In 2013, Perl was 26 years and Perl6 was 13 years already, half as old as Perl itself but nothing close to production ready. The launch in fanfare of Perl6 in 2000 had a general chilling effect on Perl: many people considered from that point that there was no point learning and using Perl 5, because Perl6 was "just around the corner" and was "the future of perl". It's just last year that people finally came to their mind : Perl6 became Raku and is a different language, period. And Perl 5 is supposed to get out of its 20-years of maintenance cycle by becoming perl 7 and changing some defaults it should have done back in 2007 or so... Well. That's life.
- Supermancho 6y agoFocusing on the community is a strange take. I dont know much about Perl6 or care...anymore than I knew anout PHP6. Perl is syntactically complete and has great library support. People dont choose Perl because it's too flexible in how to do things ie what is idiomatic in Perl...well it depends on how well you know Perl. This hurts readability and adoption. It also has warts like any other language but thats hard to detect when reading code is an issue. The best parts of Perl have already been adopted by other languages. No reason to use Perl that I can see.
- 7thaccount 6y agoAs someone who learned both well after the 2000s, it was painfully obvious to me that Python was easier to learn/use and had a lot more momentum than Perl (this was around 2012). I think that's really the nail in the coffin in that they both cover the same scripting niche, but Python won out and less people began to use Perl. Also, Perl5 has a modules approach in that there are several potential OO frameworks like Moose, while Python had it as part of the base language which a lot of people prefer. Python also became a solid data science and numerical methods language, so it ended up winning out. I never thought Perl5 was bad, just not as good as Python. As far as P6/Raku, I think the language design is good, but I won't use something like that professionally until it reaches a certain quality and production readiness. It really is pretty neat and is like a superior Python without the useful frameworks. Edit: the Python REPL approach was also much better for debugging scripts than how I had to do things in Perl.
- jes 6y agoI used Perl on and off for decades. It was fine. It seemed that Perl allowed me to leverage my existing knowledge of UNIX utilities, regular expressions, etc. So using it wasn't completely like learning a new programming language and a set of libraries at the same time. In other words, the startup cost wasn't all that high. I agree with comments about doing anything too complex with data structures in Perl. I am sure there are people that easily remember the syntax for returning a reference to a hash of hashes, or whatever. I'm not one of them. Every time I have to work on applications I wrote previously that did this, it's a couple of hours of googling and trying things out in the interpreter. If I had to write or rewrite a large application today, I'd probably use Python. I learned it fairly well about ten years ago and enjoyed working in the environment. In my secret inner fantasy world, I'd use Common Lisp exclusively, my colleagues would just agree that it is the best programming language ever, and we'd spend our days sitting in an outside cafe in San Jose, drinking espressos, hacking our .emacs files "for efficiency," and telling stories about how we used to boot computers by first toggling in the boot loader from the front panel.
- fennecfoxen 6y ago> I am sure there are people that easily remember the syntax for returning a reference to a hash of hashes, or whatever. Ehhhhh. I appreciate the opaqueness of Perl, but you've described something like the easiest data structure in Perl to write and access: return {"foo" => {"bar" => "baz"}}; return {foo => {bar => "baz"}}; $data->{foo}{bar} = "quux"; etc etc. It's when you drop away from the land of hashrefs and listrefs, and have to use plain old hashes and lists, that things actually get super weird - because most programming languages you're used to simply give you "refs" for everything, and they definitely don't have concepts like "list context" that let you merge lists by saying @a = @b, @c;
- WesolyKubeczek 6y agoA wild Python suddenly appears: third_list = [*first_list, *second_list] You don't even need a "list context" for this!
- 6y ago
- mancerayder 6y agoLink is 503'ed, but isn't Python the main external factor? Who cared about Perl6 other than enthusiasts? I witnessed the change as, overnight, my Perl expertise became 100 percent useless in the job market. Today, almost no one younger than 35 has even seen Perl code unless they work in a megalarge corporation that has legacy code.
- space_ghost 6y agoI've been happily using Perl daily for 20 years. I still use it daily, despite slowly moving to NodeJS for most production work. There's just some things that Perl does better than everything else -- text processing and gluing external programs together, namely -- that I very frequently find myself doing.
- matvore 6y agoI love using Perl too (the real one, not Raku) for the same reasons, except I haven't even been using it as long as you (only 4 years or so). One other thing you can do with Perl is transition very smoothly from one-liner, to stand-alone script, to multi-module systems, as your requirements get more and more complex. I think the visceral reactions people claim to have to the syntax and other warts are rather sad. Perl certainly has warts but with some determination you can get used to them and become much more productive as a result. I am not a big fan of OO in general, and it seems the major complaints against Perl include the object system and nested references. I happily avoid those features, and this may be why I don't resonate with the Perl criticisms.
- JulianMorrison 6y agoI was a Perl coder, it was my first commercial job. I remember being excited for Perl 6. But looking back at it in retrospect after years, I'd now put it in the category of "languages that have a gimmick", something they follow too faithfully because it initially seems clever. Perl's gimmick was "we had this text processing language based on linguistics theory, and we hung stuff off the side until it became a proper language". What the result was, really, was something that went through text like a swiss army chainsaw, but was a damn clunky mess doing real language stuff. Even if it was, for the time, pretty damn neat in its overall list of features. This neatness gradually paled as everything else caught up and surpassed it. Nothing since has changed this. Raku still has the gimmicky feel - because that is what defines it as (a) Perl. There are simply better syntaxes - better, even, nowadays, for text processing and sysadmin, where I'd reach for Ruby. And if I'm not too fond of Python, at least it's mostly uncomplicated. I think at this point you can stick a fork in it, the gimmick has run its course, it's done.
- dkarl 6y agoI think it was more than a gimmick. It scaled down brilliantly. For people who mastered it, it was an incredibly powerful command-line tool, and it worked well enough for small scripts. It scaled up horribly. It showed its weaknesses in larger scripts, and it was gratuitously bad at any scale above that. And of course, as a bundle of idioms with no surface coherence and no unifying logical principles, it was grotesquely hostile to anyone who had not spent a lot of time immersed in it. But as a tool for command-line wizardry and small-scale scripting, for tasks that didn't need to be shared or maintained outside the priesthood of sysadmins, it was brilliant, and it hasn't been bested or even equaled as far as I know. I think the only reason it fell out of favor is that you can never be sure that a task won't grow beyond this little realm where Perl shines.
- JulianMorrison 6y agoRuby is about on a par for one-liners, since it copied a lot of Perl's convenience features like auto loops over lines of stdin.
- cariaso 6y agoI was a bioinformatician who worked on the Human Genome Project [ https://www.foo.be/docs/tpj/issues/vol1_2/tpj0102-0001.html https://www.foo.be/docs/tpj/issues/vol1_2/tpj0102-0001.html ]. I used perl daily for years. In ~2004(?) I attended a San Francisco Perl Mongers User Group meeting where Randal Schwartz confirmed that Perl6 would sufficiently break backwards compatibility that the CPAN would be started from scratch. I walked out of that meeting and said out loud "oh well, I guess it's time to switch to python". I firmly believe that it wasn't specifically about the switch to perl6, it was about the loss of the cpan that broke the camel's back.
- jlv2 6y agoThe whole "Perl 6 won't be backwards compatible" effectively took the wind out of the sails. If you force people to have to redo what they already have, that will give them an incentive to investigate other alternatives. Couple this with the 15 years of "Perl 6" going nowhere just opened the door for everything else to grow in it's place.
- the_only_law 6y agoI had a minor interest in bioinformatics when I was a child and everything I would read about it pointed towards Perl beings pretty big tool. I toyed with the language a little around the time, probably couldn’t recall much now.
- dehrmann 6y ago> I guess it's time to switch to python Which would go one to have its own breaking change.
- raverbashing 6y agopip didn't start from scratch with Python 3, so the py2->3 was a much less breaking change
- Rompect 6y ago503
- at_a_remove 6y agoI used to be on many mailing lists and noted the decline of traffic long before the announcement of Perl 6. While you could argue that everything that could be asked had been asked, I do not know if I buy that. Stack Overflow suggests that there's a baseline of questions out there because new people are always arriving; I would then expect that mailing list question rate to level off at some trickle, but it completely stopped in some groups. Perl's readability is low, in my opinion, due to a few factors. First and most obvious is the reliance on, well, tons of symbols, resulting in the refrain "executable line noise." The second factor is the philosophy of there being more than one way to do it; this means that you have less local idiom in the language and so you have to spend more time guessing how this programmer did it. The third factor is what I would consider cultural: one-liners. The one-liner is an interesting exercise but it only proves how clever you are in writing the code for a very arbitrary restriction, the number of characters used, and the tradeoff is readability. Another big arc would be CPAN. So many modules, each covering a different eighty percent of what you needed to do. And heaven help you if you were on Windows for some odd reason because many of those modules needed a compiler, or at least the ones I came across did. The standard library was simply too anemic, and so you were left trying to find just the right package and hope you could work around its shortcomings instead of doing something obvious and getting on with your day. I do not buy into the network effect of the article. Perl was there before Python, and it was larger than Python for some time. Culturally, it was a ticking time bomb, waiting to be supplanted by a language that was not a write-once, read-never design. In a similar sense, PHP's culture assured its fast adoption and rise, but also would bring it an ugly reputation, which it still struggles with -- perhaps now unfairly!
- spookthesunset 6y agoCPAN, way back in the day, was ahead of its time but it eventually became eclipsed by other package managers. And like you said... other languages like python came "batteries included" with a ton of stuff that you'd have to spend quite some time hunting around for on CPAN.
- Tycho 6y agoTo me the core problem is that it's much harder to read than its direct competitor, Python.
- alexhutcheson 6y agoAny analysis of Perl’s decline that doesn’t mention PHP is incomplete. Between the height of Perl’s popularity in the 90s and today, web development was the single biggest growth area, and PHP ate Perl’s lunch in that domain. Why did that happen? In my opinion, PHP had two major advantages over Perl: 1. mod_php for Apache could safely be run in a shared hosting environment, so hosting for PHP was cheap and ubiquitous. mod_perl couldn’t be run in shared hosting, so anyone doing web development in Perl was stuck with either using CGI, or paying for more expensive dedicated hosting. 2. PHP’s approach made it easier to get started for people who were new to web development, or new to programming entirely. This was important in the late 90s and early 2000s as a huge number of people started doing web development for the first time. By 2000, PHP was already the dominant “scripting language for the web”. If the Perl community had focused on improving web development, then maybe Perl could have caught up, but they focused on Perl 6 instead, and PHP continued its growth without much serious competition from Perl for web development mindshare. MediaWiki was written in PHP in 2002, and both Facebook and Wordpress were written in PHP in 2003. The article focuses on Python, but during the relevant time period (roughly 1995-2005) Python was a niche and unorthodox choice for web development. Python finally started to gain traction for web dev in 2005 (Django, Pylons, TurboGears, and web.py were all released that year), but by that point Python was mostly competing with PHP, and Perl was already much less relevant. In summary - the article focuses on how Perl lost the market for scripting, but scripting was always a smaller and less important market than web development, and PHP killed Perl in the web development market. If Perl had stayed relevant for web development, it likely would have stayed relevant in scripting as well, because programmers like to use languages they already know (see: JavaScript). Perl 6 was the nail in the coffin that ensured Perl wouldn’t catch up in the web dev race that it was already losing.
- tyingq 6y agoExcellent point. For the same reason, Ruby/Rails is worth mentioning too. The article does mention Ruby, but not Rails.
- alexhutcheson 6y agoRails didn’t really pick up until 2005 either, by which point Perl had already faded considerably. The most interesting counterfactual is “What if someone had written something like Rails for Perl before 2005?” It was definitely technically possible, and it might have made Perl take back off (Ruby usage grew from basically nothing due to Rails), but the community’s focus on Perl 6 at the time made it much less likely.
- ff317 6y agoThere are many valid perspectives and issues on the decline of Perl, many of which are valid, but I'll add my own about the perceptions (as an ancient Perl coder who has mostly moved on) of Perl code being pretty messy and unmaintainable on average: I think Perl has always been an artist's tool, rather than an industrial tool, and this is why so much Perl code in the world is a relatively-unreadable mess. It grants great artistic license (which was also the name of its software license!) to the coder, as evinced by the Perl community motto TIMTOWTDI ( https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to... ). In the hands of an expert working on a labor of love, flexible artistic tooling allow maximal freedom and craftsmanship to create truly great things. But in the hands of novices, or even experienced professionals who are tasked with just getting something functional done on a deadline, there's little in the way of guardrails pushing the solution towards elegance, simplicity, and readability. Most coding work that is ever done is more industrial and task-focused in nature, and artistic tools aren't always really the right tools for that job. By way of analogy: Let's say in an industrial setting a manager decides that a new, large, safety warning placard needs to be created to warn employees about slipping on the wet floor of the factory. The manager could task an employee to go pick a standard "Wet Floor" sign from a catalog and order it, or she could decide we need a custom message and ask someone to contract with a signage company, or even in a pinch she could decide to hand someone a big square of plastic, some white paint, and a set of letter stencils to go make a sign with. She might even cite some ANSI standards the sign has to comply with about font sizes and colors for warning signs of this nature. What she'd never rationally do in this scenario, is just hand them a gift card to an art supply house and a tab of acid and tell them to go be creative, which is probably the closest thing to the Perl way to go about the problem. Nonetheless, Perl has value and merit, and is a beautiful thing.
- rurban 6y agoAgain the maintainers solely responsible for that debacle are blaming others. It's perl6's fault, it's ruby's fault, it's javascript. Whilst they dont admit they had nicely developed specs and list of features to implement (for perl6), but couldn't manage (technically) to implement even the most simple ones from 2002 to 2021. Management is not-existing, developers all went elsewhere. You don't want to argue with people you have no idea. Famous is e.g. how Russ Cox was treated when re2 and backtracking DDOS was presented to p5p: https://perl.perl5.porters.narkive.com/guZUVhlv/article-on-perl-regexp-performance https://perl.perl5.porters.narkive.com/guZUVhlv/article-on-p... Just a few amateurs and system admins, who use it for their job are dabbling with it and keep destroying the codebase. It was unmaintainable in 2002, and it's more so now. The language is fine, p5p (the development process) is totally broken.
- peterhi 6y agoI was a Perl dev for more than a decade and the only problem we had was when we started to grow the company. We needed programmers who could do Perl but graduates had not even heard of it. How do you evaluate a graduate who had been taught Java as to how well they would do with Perl? Would they even want to learn it? Learn Java. Work in finance. Take the money :) Perl devs were self taught hackers. Finding them was nigh on impossible We ended up with a bunch of Java devs and pivoted to Java for all new applications. As a commercial decision it was sound and the company is doing well I'm doing Ruby now and facing the same problems but at least the graduates have heard of Ruby so they at least know what we are asking them to do And yes Perl6 was a massive issue. At least they finally acknowledged that it was really a Perl inspired language and not Perl at all
- commandlinefan 6y agoSounds like a bunch of perl clutching to me. ;P
- cutler 6y agoThe mod_php factor with cheap hosting thing isn't the whole story as many cheap hosts only offer PHP/CGI.
- newobj 6y agoI've been doing everything in my power to avoid perl since the early 90's. It's a garbage language. It thrived in spite of itself. Its obtuseness is fetishized. Its users have Stockholm Syndrome. I don't know what else to say. Bracing for downvotes.
- cutler 6y ago"Programming Perl" by Larry Wall sits on a bookshelf across from my bed. When I wake up it's usually the first book my eyes alight on though I don't use Perl much these days. It still brings back fond memories and is an inspired work to this day. Larry Wall was a linguist and Perl will always look like sigilitis if you don't take half an hour to grok context. Perl particularly appeals to those who see beauty in regular expressions. Those that hate/avoid regular expressions usually hate Perl. Perl was my first real programming language after I found a reference to regular expressions in the Find & Replace section of a Dreamweaver manual. There was a reference to Jeffrey Friedl's brilliant work "Mastering Regular Expressions" which was part of the O'Reilly Perl library and that led me to Perl. Happy days. Much better than fighting my way through the thicket of front-end Javascript.
- perlperson 6y agoLots of interesting comments about Perl's shortcomings here. I think it's safe to say both Ruby and Python became popular because they addressed this sentiment -- for instance, type "man ruby" and notice references to Perl twice in the description. Python's "one way to do it" was a direct reaction to Perl's motto "there's more than one way to do it". Perl 6/Raku was also a response to Perl's shortcomings. The rewrite has allowed the language to leapfrog several other languages in various ways. Without going into details, I'm thinking about just concurrency, gradual typing, parsing, method dispatch, unicode handling -- digging into any one of these topics reveals a lot of richness to be explored.
- orf 6y ago> 503: No server is available to handle this request. Should have used PHP.
- forgotmypw17 6y agoI started a project with Perl as the primary language recently (couple of years ago) because it has remained stable for 20+ years. The lack of breaking changes between releases, so common in other languages, was a major selling point for me. Just about every other language I've used, as a high-level coder, would not have stood up to 20 years, but Perl has. I think of it as a feature-complete language, enough to get what I want done without making me worry about migrations when "old" syntax is "deprecated". I still start my Perl scripts with "use 5.010", and it is enough for me to generate HTML from text and do whatever else in between.
- marcod 6y agoMirror https://web.archive.org/web/20210401101221/https://www.nntp.perl.org/group/perl.perl5.porters/2021/03/msg259484.html https://web.archive.org/web/20210401101221/https://www.nntp.... (getting a 503 from the original)
- reducesuffering 6y ago> "In practice, Python has snowballed simply because of network effect. Everyone knows Python so everyone uses it so everyone new has to learn it." Sigh. You would think that reflecting on a thread the author knows is public would have better introspection than this, but there's that Upton Sinclair quote again: “It is difficult to get a man to understand something, when his salary depends on his not understanding it.” Python didn't win simply by randomly being selected as the choice to snowball effect on. Ask any language-agnostic or new programmer to take take a gander at each one. 90% will find Python easier to use. That's where Python's strength is, and that is a huge market, as the general population just isn't that great at advanced lower-level programming like C++. So you have college intro courses and programming-adjacent fields in academics (stats, bio, etc) able to dabble into Python. Perl kept plodding on with it's diehard unix fanbase. You can't expect mass appeal when that's your focus. Still failing to acknowledge this is what contributed to Perl's downfall (random snowball effect, seriously?) at the expense of Python is why Perl continues its decline.
- hatsuseno 6y agoExtrapolating your take on Python's snowball here means that Python will fast decline given it's just bloating with every passing year with whatever the PEP reviewing folk think is a good addition to the language. The TIMTOWTDI perspective that I personally very much appreciate and value is slowly taking the field from Zen Python's one obvious way to do it.
- UncleOxidant 6y agoNot only that, but the "everyone knows Python so everyone uses it..." argument seems tautological (Python won because it won). You could argue that more people knew Perl in the mid-to-late 90s than Python - so why didn't "everyone knows Perl so everyone uses it so everyone new has to learn it" sustain Perl's adoption then?
- dkarl 6y agoIt seems like people barely have to glance at Python to know it. Perl is harder, and for many people (or at least me) it didn't stick without constant practice. I put in the effort to learn Perl several times, but any time I left it alone for a month or two, my brain purged it. I finally embraced Python after realizing that I could still remember how to code in it after casually messing around with it a few months prior.
- nige123 6y agoSigils can induce fear in some programmers. The double-edged sword of Perl and Raku's expressivity is something that the community is addressing: https://raku-advent.blog/2020/12/02/day-1-perl-is-dead-long-live-perl-and-raku/ https://raku-advent.blog/2020/12/02/day-1-perl-is-dead-long-...
- sershe 6y agoI remember Perl being distinctly painful to maintain. My favorite example was when I made a little blog engine in college, that had a calendar component that showed the old posts but had various neat features (in addition to actually handling all the special cases of rendering a calendar). A couple years later I needed a slightly different calendar render for a freelance project that had to be in Perl. I looked at my old, terse Perl code (it was maybe a couple screens if that), tried to understand what the hell it is doing, and wrote the new calendar from scratch. I also made sure to "write C in Perl" so someone could actually understand it later. It's possible to write clean code in Perl, but from pretty much every codebase I've seen, it is not natural :)
- skywhopper 6y agoI learned Perl in the mid 90s and it was a revelation. You could do so much with it so easily. But by the mid 00s I was working to phase it out whenever I saw it, because of several factors, some identified here already: * poor language support for building complex programs or data structures... it was possible but never easy. * the stdlib: compared to PHP, Python, and Ruby, Perl offered very little built-in, which means that the next item was even more critical: * CPAN: was extremely difficult to automate and extremely flaky compared to the alternatives, RubyGems in particular. And yes, Perl6, which for a long time prevented Perl5 updates entirely. They got past that, but it was too late. I think the uncertainty guaranteed no one was going to invest in pushing for the needed improvements to CPAN either (tho maybe they’ve happened, I haven’t even tried in a decade).
- brightball 6y agoI’m glad I learned Perl before the big decline started. Just having the Perl experience with Regex altered my perspective on the language as a whole. Even though I miss it, it’s hard to justify using Perl for much these days other than the “it’s everywhere by default” reason in enterprise Sys admin environments.
- pnathan 6y agoI started off professionally writing Perl 5. A few comments. Perl 5 fails in separate areas. * no standard OO system * no standard exception system * no standard module system * context-driven polymorphism * the standard library didn't have JSON and a few other key needs built in, so dragging in CPAN all the time was a hassle. The first three issues generate maintenance issues that are not found in other languages that are roughly isomorphic. The fourth generates bugs. The fifth generates deployment problems out of line with its competitors. Perl is also, as alluded to elsewhere, an expert tool. Those have not fared well for the past 25 years, sadly. Hopefully in the next 25 years, as the industry matures and stratifies, experts will have the opportunity to select and use difficult but high quality tools on the regular. The Perl 6 horse got put together for another ritual beating, I see. Have at it. Sigils and the other ideas from linguistics are a notion which I believe will be adopted down the road more and more. I see them as one of the best syntactic ideas of Perl, although the context-shifting use of them (@ vs $) is something I see as bug-prone.
- c-cube 6y agoIs there any sign that other languages are going to adopt sigils? I can't think of any new language that does, and no one ever talks of the idea. If anything, types are getting more popular and will probably totally subsume sigils?
- bmn__ 6y agoI like to think that I have a pretty good grasp on the current landscape, and concur that a trend can be observed for new languages specifying their identifiers to be sigil-free. Types are an orthogonal concept, so this direction of thought is fruitless and explains nothing. (An example is Raku, it has both typing and sigils.) People should discuss what sigils or lack of them brings to the table, and language designers must be challenged to defend their decision for or against sigils and explain the resulting trade-off specific to their language. I sincerely hope they are not simply acting out of ignorance, but it's plausible because the language design docs make no mention. Well, Sturgeon's law applies: not everyone's a Larry. Yet, I don't see that kind of rational discourse happening in the vast majority of cases. Instead I see something very superficial, namely end-users complaining that languages are different. Features that cannot be found in the majority of languages are suspect and basically criticised as a foregone conclusion for just being there, i.e. they will not entertain finding out what the advantages of having identifiers with sigils are. This makes me sad because tolerating this discourse makes the world dumber.
- maxharris 6y agoI'm surprised that the author didn't mention syntax, symbols, keywords and the like. I remember when Perl was popular in the late 90s, and I could never figure out because it was simply too difficult and confusing for me to read. I found it much easier to understand languages that favor the use of words over symbols, and I suspect this is the case for many other people as well.
- shp0ngle 6y agoI remember unrelated talk by Node.js author when talking about Deno and the mistakes of Node, “don’t try to be cute when designing a language”. (Or something along those lines.) Perl design seems like it tries to be “cute” and “clever” almost every design decision. “Hey let’s name it bless, hey add unless and if too”. Even the documentation tries to be all funny and jokey. The language suffers for it, when you actually try to do something serious.
- redis_mlc 6y agoFYI: I use perl5 every day. Works fine. Love the moderate static and dynamic type checking, forward references and Mojolicious - which Python has none of.
- bsder 6y ago> KiCad has a scripting engine for automating boring repetitive tasks - it's Python. This is actually a giant sore point for me as a programmer. Let me ask the HN collective for advice: How do you set up an interface for a scripting language in a larger application? Most applications like KiCad or Blender have their own Python baked very deeply into the software architecture. It works ... mostly ... but it seems to me like its suboptimal 1) you have to jump through an enormous amount of hoops to try to connect your "normal" development environment to the "captive" scripting engine. 2) controlling UI elements from the scripting language is a real PITA 3) you don't have a choice of scripting language It seems like there ought to be a better way to do this, but I always wind up sort of landing on "open a socket and talk RPC" which has it's own failure modes (for example: how do you expose everything (including the UI) and how do you handle concurrent access). What is the solution to this?
- bmn__ 6y agoI'm also interested in this topic and have surveyed the existing and am sad to report there is no excellent and universal solution, merely good enough ones. Adopting DBus goes a long way because it gives you introspection, GUI control and concurrent access for free. The way forward seems to be to stick to a single blessed extension language and try to reduce the pain points when integrating with IDE, debuggers etc.
- xupybd 6y agoPerl is not a good developer experience. Try working with a database such as sql server. If the sybase driver gets the string encoding wrong good luck debugging the problem. Perl has a syntax that appears to be designed to make a google search impossible. I'm not sure why they want you to explicitly work with references. Constantly having to dereference is nothing but noise. Tooling is non existent. Want to step by step debug, good luck. It's just not fun.
- bmn__ 6y agoHave you asked for help? I would really appreciate an honest answer. I'm putting out this question because your post reads like you never did, and I can totally see having a bad time when someone voluntarily shuts himself out of the community and thus never gets to see frustrations addressed. I don't want my fellow hackers to suffer bad feelings when it's completely and easily avoidable. • Support for database drivers exists, most notably the DBI mailing list where all the driver authors participate. This is mentioned prominently in the documentation. • Perl predates Google, so it is tragically wrong to put the blame on Perl. Blame Google for not searching correctly for a long time. This is fixed since 2019. Other search engines did not make mistakes of the same kind. I personally do not see Google as the first and final means. It's not asking too much using other means of looking up information when Google falls short, e.g. the offline documentation shipping with language, or bookmarking some specialised Web sites and using their search. • Explicit references are a consequence of Perl's early life (< v5) catering to programmers familiar with shell, and then adding the feature in a backward-compatible manner. When it came to adding the feature, it was the choice between explicit references with the benefit of keeping code running, or implicit references and invalidating existing code with the benefit of terser syntax (i.e. the dereferencing arrow -> would mostly disappear). The trade-off was made in favour of backward-compatibility, and this direction was the case ever since. Hope this explains it well enough, keep in mind that you have the advantage of judging the decision in hindsight. • Debuggers not existing is just plain wrong.
- xupybd 6y agoNo I didn't go to the mailing lists. I did seek help on Stack Overflow. I also asked the Perl expert at work. He tended to get mad and say things like "that's basic CGI, you should know that". I agree Perl's docs are great. Once I discovered 'man perl op' I was set. My complaint is that Perl differs from other languages where a quick Google of a bit of syntax leads directly to stack overflow question or the language docs. The DBI issue I had was a mix of FreeTDS, Sybase and SQL Server 2008. The combination of an old version of SQL Server and these drivers meant we hit uncommon bugs. My complaint here is how tricky it was to debug. The string has an internal flag to say that it's UTF8. Somehow that was getting set when the encoding was Windows CP1252. It took me a long time to learn about how Perl stored these Strings. Even longer to resolve the issue it caused. Something about packing and unpacking a string just felt harder than it needed to be. The experience left a me disliking Perl. I worked with a Perl backend for almost a decade. I love not working with it now. I don't blame Perl for it's difficult to Google syntax, or it's design choices for backwards compatibility. I know some people are Perl grandmasters and can do amazing things with it in short time ( I worked with one ). But to me I didn't like it, it felt out dated and harder to use than any other scripting language that I've used. Debuggers may well exist. My initial attempts at getting one running failed, but that was years ago. If there are good debuggers out there I'm happy to admit I'm wrong on that front.
- WesolyKubeczek 6y agoI'm mostly ambivalent towards Perl — but I'm not afraid of programming in it, and there are a few financially lucrative Perl jobs which are such because of Perl programmers shortage. Usually you need to keep running (and develop new features, too!) a moloch of code that was born two decades ago. It's not fun and not hell compared to other jobs. If it does keep running, it's not that bad. To put a perspective on it, I've seen Python codebases so overengineered, brittle, and hard to read, that I couldn't help but think that the authors chose the hard way quite deliberately, and that they viscerally hated their colleagues. This doesn't make Python the language bad. But how Perl handles Unicode and it's plethora of internal flags on strings that make them bags of octets, maybe-invalid UTF-8, valid UTF-8, and other such nonsense — is driving me nuts! Because it's documented right there in `perlunicode`, some people take those flags to introduce some kind of their own type system. Mostly it's DBI, which will send corrupt data to your database if a string value had the wrong flags. There may be others, but DBD::mysql is something I've been burned by. Now, sometimes you get the string after soaking it in a chain of third-party module calls, and you can't be sure if it's all octets, or it's UTF-8. `eq` returns true on two strings, but on the application-database boundary you get two distinct behaviors. I know that people have been furious about the bytes/unicode split in Python 3, but trust me, it's the better than Perl's nightmare.
- mfringel 6y agoThere are more than a few times that I have had to comment to someone "I have not followed your evolution as a programmer over the past 15 years, therefore I can not read your Perl code."
- musicale 6y agoThere may be some analogies between the Perl 6 and Python 3 transitions... Unlike the author, I think there is room for more than one language in town. PHP and Ruby are still around, after all.