5 ms·
Perl Pessimism: https://trends.google.com/trends/explore?date=all&q=perl https://trends.google.com/trends/explore?date=all&q=perl I have happy memories of Perl
by kstrauser 9y ago
Perl Pessimism: https://trends.google.com/trends/explore?date=all&q=perl https://trends.google.com/trends/explore?date=all&q=perl
I have happy memories of Perl, and it started me on the path that led to a nice career of Python awesomeness. Thanks, Perl! That said, I can't imagine a plausible scenario where I'd ever consider using it again. I almost certainly wouldn't use it professionally because it's not exactly going to light up a resume. Yes, there are still Perl shops. But no, there aren't very many of them, and I'd be highly suspicious of an engineering department still writing new code in it today without a very good reason.
- petre 9y agoWe are one of those Perl shops. The reasons why we're still using it are: old codebase started in 2004, >95% rewritten, the language is stable, fast enough and it scaled well for our needs after we rewrote the web services using Mojolicious. I'd also pick Perl any day over PHP or Python. We also write a fair amount of Javascript on the frontend but moving the backend to Node.js doesn't add any benefits. It just makes things harder, having to track constantly moving targets, using many different tools to accomplish the same jobs, having to fork stuff just to get it to work properly.
- kstrauser 9y agoThat’s on the short list of “oh, that makes sense” reasons.
- mattgreenrocks 9y agoI'd advise you to remain curious beyond what's good for your resume, especially if you want to stay sharp and ahead of the curve. Perl 6 has some neat features, particularly around grammars and parsing, that make those tools easier to use for day-to-day problems.
- kstrauser 9y agoTo be sure! I’m not allergic to Perl and I like seeing the cool new stuff going on there. But afterward, I prefer to take those learnings and apply them to work I’m doing in other languages.
- raiph 9y agoTo begin to transfer P6 grammar/parsing features or techniques to another language you'd have to bundle NQP and one of its backends. Does that sound worthwhile? Also, how would you handle strings in this other language? In P6 and its grammar engine, a string is a sequence of characters, where characters are defined as the thing a human thinks of as a character. Almost all other languages have adopted either a byte or a Unicode codepoint as being equivalent to a character, both of which are really profound problems that are still not being confronted to this day. For example, the draft docs for Python 3.7 don't even mention characters (by which I mean what a user thinks of as characters, not bytes or codepoints).[1] [1] https://docs.python.org/3.7/search.html?q=grapheme&check_keywords=yes&area=default https://docs.python.org/3.7/search.html?q=grapheme&check_key...
- loggedinmyphone 9y agoIs there anything "suspicious" about using Perl other than it's not as popular as Python, according to Google Trends?
- vgy7ujm 9y agoNo. It's not suspicious or dangerous in any way compared to Python.
- kstrauser 9y agoNo, there’s nothing inherently wrong with it. I’ve run across two distinct sets of Perl mongers, though: - “We have lots of deployed code and don’t want to rewrite the whole thing.” That’s valid (although I still urge them to consider the hiring challenges down the road). - “I’ve used Perl exclusively since I downloaded it over dialup and I’m not interested in those shiny new languages the kids like.” Run screaming.
- tomc1985 9y agoThere's also the "I really like Perl and I wish more people took it seriously" set (which I consider myself to be a part of)
- loggedinmyphone 9y agoI've never met a Perl developer who doesn't know and use other languages. By contrast it's much more probable that a "kid" writing Python or JavaScript has never been exposed to anything else. When you say you wouldn't use Perl again, that's a fine personal choice, but has zero to do with the merits of the language or the people who use it.
- orev 9y agoSo many things are already written in Perl, so moving to another language just for popularity’s sake unnecessarily introduces another standard in an environment. There might be reasons a new language is needed, but sticking to Perl and Bash, if that’s mostly what your environment has, makes sense in many cases. The popularity argument only makes sense in regards to hiring new people, which is a fair point.
- kstrauser 9y agoI don’t disagree with the first part. That’s a legit reason to stick with what you have. But yes, it is going to make hiring more challenging.
- 1024core 9y agoAs a former Perl programmer, dabbling in Python, I keep getting reminded how awesome Perl is. For example: I'm collecting some stats indexed by (small) ints. In Perl, I'd just say $collection[$index] = $stat; Try that in Python when $index is not received in order. Edit: Fixed typo; meant "$stat" and not "%stat"
- kstrauser 9y agoIn Python: dict[index] = stat ...works much the same.
- arunix 9y agoThe Python version blows up if the slot isn't already populated. The Perl version works in either case (there is a typo in the Perl code though).
- amyjess 9y agoOnly if you're using a list, not a dict. I just tried it in the REPL: >>> foo = {} >>> foo[3] = 72 >>> foo[64] = 80 >>> foo {3: 72, 64: 80}
- arunix 9y agoThe difference is more dramatic once you have two or more dimensions: >>> foo = {} >>> foo[3][4] = 42 Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: 3 Compared to: DB<1> $foo{3}{4} = 42 DB<2> x \%foo 0 HASH(0x7f9f4315c940) 3 => HASH(0x7f9f432bb148) 4 => 42
- pseudalopex 9y agotree = lambda: collections.defaultdict(tree) foo = tree() foo[3][4] = 42
- 9y ago
- mrtweetyhack 9y agoI'm glad to say I have no memories of perl
- kamaal 9y ago>>Yes, there are still Perl shops. But no, there aren't very many of them That's because any shop that needs to get job done quickly is a Perl shop. During my early career I even knew a architect who had sort of put a blanket ban on any Perl to be written. He was only stumped people were largely acting like pirates, were writing and running directories full of Perl code all the time. Only a week back, I needed some stuff to be written. Talked to a Java guy, he tells me he can do it in a week. Told him to never mind. Went back to my desk and wrote in a afternoon in Perl. And we are a Java shop and write Java most of the time. But its just that Perl is unbeatable in getting things done. And yeah Python. It doesn't even remotely hold a candle to Perl in terms of practicality and getting things done. Readability and all that, but frankly beyond that there is nothing in Python. Not even multiline lambdas, half baked, half implemented functional programming features. IO looks like somebody held a gun to the implementors head and he added it because he had to. Some times I even find, sed and awk to be a million times more useful than Python.
- kstrauser 9y ago> That's because any shop that needs to get job done quickly is a Perl shop. Be careful with that wild generalization. I’ve seen lots more “get job done quickly” in Ruby than Perl (but neither as much as with Python recently). I have nothing bad to say about Perl, but it’s not really defensible to claim it’s used as commonly as other languages.
- tomc1985 9y agoJust remember there is a lot of perl creeping around the linux ecosystem; it may not be fashionable today but availability of the perl command is still more common than python, second only to bash/sh.
- deleted 9y ago[deleted]
- tomc1985 9y agoHA! That gun-to-the-head bit is so true. Sometimes I feel like the only person who dislikes Python for its design principles.
- systems 9y ago"The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." ― George Bernard Shaw Not all great decisions are rational, follow your heart be happy For me, Python is an uninspiring language, yet it inspired many people to build great things, a decision that to me, sound so .. irrational
- emmelaich 9y agoThe trouble with that syllogism is that some take it to mean that all unreasonable men create progress.
- systems 9y agoI would even say most unreasonable men fail Very few succeed, but those who do, make big changes It is a high risk high reward type of decision But honestly, Perl 6 is not that bad of bet, there while small, a lively community around it filled with brilliant developers
- jlg23 9y agoIf programming languages' impact on resumes would be a sensible metric I had never learned LISPs, prolog or MLs. Those experiences have been the key to many well-paying gigs, even though I more often than not was hired for some mainstream language/stack. I too would hesitate to use it in a commercial context, but only because its development stalled for 15 years, leaving us with almost no developers that still speak perl and still work in the trenches... perl's cost of adaption in comparison to other dynamic languages skyrocketed :(
- cygx 9y agoArguably more interesting: https://trends.google.com/trends/explore?date=all&q=perl%20tutorial,ruby%20tutorial,python%20tutorial https://trends.google.com/trends/explore?date=all&q=perl%20t...