31 ms·
Perl 7 is going to be Perl 5.32, mostly
- sumanthvepa 6y agoI was part of a team that wrote significant parts of Amazon's payment processing systems in Perl in the late 90s. I really loved the language. It's object system was so flexible and powerful. Once you understood how write idiomatic perl. It was a joy to use. I'm looking forward to trying out Perl 7.
- jqcoffey 6y agoOk, so I wrote tons of Perl and am to this day a fan, but I don’t think one can call a blessed hash (or scalar for the fancy folks) an object _system_. It is flexible and fun and I do miss it. True story: years of passing functions to other functions and map/greps made the switch to FP Scala (another language I fear will die) a lot easier!
- cutler 6y agoI've heard Python's object system isn't that different under the hood.
- phone8675309 6y agoYou even have the same boilerplate of the first argument to a class member function being the object itself.
- cutler 6y agoYes. I was thinking mainly of Perl's symbol table which I believe is also how OO is implemented in Python.
- daotoad 6y agoMy understanding was that Perl's OO system was directly inspired by Python's. I can't find a source on that though.
- jlokier 6y ago> I don’t think one can call a blessed hash (or scalar for the fancy folks) an object _system_. Perl first, then JavaScript. Did you know JavaScript classes are blessed hashes? They even take about the same amount of syntax. ("__proto__" vs "blessed", "prototype" vs "bless"). Old JavaScript made the blessing crude and obvious. Modern JavaScript lets you hide it in a "class" decleration. Which you can also do in Perl if you want (though you'll need to choose a module for this, and people generally prefer a different approach to dressing up objects in Perl.) There's still a blessed hash under the hood which you can see and kind of have to be aware of... in both languages.
- daotoad 6y agoPerl and JavaScript both give you a minimally specified set of tools you can use to build your own more advanced object system. IMO, that's why both languages have been able to be extended and adapt so much. If you look at tools like Moo and Moose in Perl and the different coding paradigms that evolved in JS before the "class" keyword was standardized, this is pretty clearly evident. JS has had the advantage of a standards committee pushing new language features aggressively. Perl has moved more slowly, keeping a majority of functionality in libraries.
- jqcoffey 6y ago> Did you know JavaScript classes are blessed hashes? > They even take about the same amount of syntax. ("__proto__" vs "blessed", "prototype" vs "bless"). omg, I totally forgot that (I left day-to-day JS use a good decade ago, sorry!).
- lmm 6y agoTraditional JavaScript has a notoriously poor object system yes. If those are the only two languages you know then I guess Perl's object system doesn't seem so bad, but that shouldn't be a defense of either language.
- Discombulator 6y agoVery similar story here; I barely write any Perl nowadays but am still very fond of it. I especially like the sigils - they serve in a way as a primitive type system and actually convey useful information when reading code. I suspect people who complain about them are the same who dislike strong typing. Interestingly, like you, nowadays I am very fond of Scala.
- jes5199 6y agohuh. I spent a couple years writing perl professionally, I guess that was around 2006, and I couldn't agree less. Its object system is so bizarre compared to any other language - it's like it doesn't really have an object system, it has parts of a system that you can try to assemble, but no matter what you do you end up with something weird. And on top of that, the sigils, refs, and `wantarray` systems means that figuring out what syntax you need to invoke something correctly is confusing mental overhead that you have to keep in mind for every function call Basically the things I learned in perl were the least transferrable concepts of any programming language I've ever worked with. You learn Haskell, or Forth, or Lisp and you learn insights and patterns that you can use in any language. You learn perl, and you've learned nothing but Larry Wall.
- earthboundkid 6y agoPerl definitely has a lot of non-patterned arcana. For instance, $| This variable, if nonzero, will flush the output buffer after every write() or print() function. Normally, it is set to 0. In other languages, you do something like os.stdout.buffered(true) or sys.stdout = io::buffer(sys.stdout) or something like that where you're combining composable pieces: the standard std variable, a standard way of opening files with or without a buffer, etc. Perl instead has an obscure global variable that you have to look up/memorize, and it doesn't even have a sensible name like $STDOUT_BUFFERING, so readers who come across $| in a file have to look it up/recall from rote memorization, or hope it has a good comment above it.
- rlpb 6y agoI'm no fan of Perl, but you can use $OUTPUT_AUTOFLUSH instead if you "use English;". So this isn't really a Perl language thing; it's a style thing. Other languages can be made to look really bad with poor style. The question then becomes what is culturally accepted, and what is not.
- ljm 6y ago`use English;` as a directive feels like the programming equivalent of someone on TV saying "ye ye ye can you say that in English!?" Only, it's the programmer saying it this time, not the layman. Perl is a 10x engineer.
- ricardobeat 6y agoThis seems to be a common experience - people say it felt powerful and modern in the 90s, because it was. For those who started programming in the 00s and 10s it looks clunky and weird compared to the other options.
- cutler 6y agoThat doesn't add up because today's most popular languages - JS, Java, Python, PHP and Ruby - were also released in the 90s.
- earthboundkid 6y agoPerl was released in 1987. The languages released in the 90s all stole Perl/Awk's good idea (have an associative array/hash map/dict type as a builtin data type) but had much nicer syntax.
- cutler 6y agoPerl5 was released in October 1994. That's the version which competes with Python, Ruby and PHP because it introduced OOP.
- dhosek 6y agoI stuck with Perl even when Ruby came along and offered to be the next best thing because Ruby didn't have a use strict equivalent. Having to declare variables before use is a good thing.
- dhosek 6y agoPHP was a reimplementation of Perl by someone who didn't understand why Perl did things the way they did and so ended up creating a vastly inferior language. Other than maintaining some legacy projects, I've not touched PHP in over a decade and I'm glad to avoid it. Perl is a tool I still return to for some tasks (one was a bizarre management request for a spreadsheet of all the Java classes in a large project which took fifteen minutes to create a Perl script to generate and ten of that fifteen minutes was looking at documentation for Perl modules I hadn't used in a long time).
- papito 6y agoPerl was a great fun scripting language back in the day of CGI and "webmaster@". It died a noble, honorable death. RIP.
- _sbrk 6y agoIt's not even close to dead.
- cutler 6y agoTrue. If you search Indeed.co.uk there are more jobs which mention Perl than Golang.
- papito 6y agoWhile you can FIND Perl jobs, it is effectively dead for most of the hiring market. It will never truly disappear. COBOL is not dead either. Is it really something that we think of when we talk about modern software engineering? Not really. How much production software is started from scratch every day using the language? I started my career in Perl and I still have fond memories of working with it up to late 2000's, but by that time the writing was solidly on the wall. Dead in this context means "niche".
- deleted 6y ago[deleted]
- staycoolboy 6y agoI was on one of several CAD teams at Intel in the 90's and huge parts of pre and post-silicon Itanium simulation flows for timing, layout and verification were written in Perl. (Not even Perl 5.6 so we hit the 2GB file limit often!) ... Not the tools themselves, but the control flows and asset managers. The other processors still used Tcl on HPUX/Solaris/AIX so Perl on Linux was like nice warm sheets by comparison.
- zeveb 6y ago> The other processors still used Tcl on HPUX/Solaris/AIX so Perl on Linux was like nice warm sheets by comparison. I would agree, but I don't think you meant it the same way I would: I prefer nice cold sheets when I sleep, and I much prefer Tcl to Perl!
- tunesmith 6y agoI also quite enjoyed perl. There are a lot of us that cut their teeth on perl and know it well, even if we are currently working in other languages. We also tend to de-emphasize it on our resumes for obvious reasons. But if I had a contract opportunity to spend months or years on a large perl codebase, refactoring it or porting it to something else, I'd probably snap it up in a heartbeat.
- tdhz77 6y agoUnited States District Court filing system for court cases is written in perl. Horrible language filled with one liners that only makes sense in the mind of the now retired and gone programmers. Sadly, I do not know why we cannot pursue other technologies. Perl is a trap... buyers will be stuck for 30 years. Like a mortgage, but without equity or returns.
- snapdangle 6y agoYou might want to go ahead and inform those investors who bought Amazon or Booking.com stock in the early 2000s that their orders of magnitudes of returns were really no such thing.
- crazypython 6y agoI hear Perl has weak typing with implicit type conversion. The only other language I know that has a powerful implicit type conversion system is C++. How does implicit type conversion work in Perl?
- kbenson 6y agoConversion is done based on operator, and Perl has different operators for string and numeric operations. For example, == and eq are different operators, with the former doing numeric equivalence comparison, and the latter doing string equivalence comparison. The implicit conversion done to operands in each case is well defined and obvious. Edit: Whoops, had operators reversed because I explained them after the fact. Fixed!
- daotoad 6y agoThere is also a concept of "context" in Perl. An operation may be evaluated in list or scalar context. For example, if you evaluate an array in list context, you get the members of the array, however, in scalar context, you get the number of elements in the array. This idea is generalized to discuss different evaluation contexts for scalars. You might hear people discussing how a value behaves in boolean or string context. It's also common to talk about casting as "-ification", for example casting something to boolean context is "boolification". By default, undefined values convert to empty string and 0. However, this can be made to generate a warning or even a fatal exception by setting the appropriate pragmas.
- redis_mlc 6y agoGenerally in Modern Perl-style programming, strict and warnings are enabled, so implicit type conversion is not used as much these days. Warnings or errors are emitted. I've found this greatly increases reliability. An example is that I enabled those on the W3C checkers and a serious latent bug was discovered and fixed, even on code I wasn't familiar with.
- mrtweetyhack 6y agoDon't know anybody at Amazon but are they still using Perl or have they replaced it?
- Upvoter33 6y agoThere used to be a big Python/Perl debate. I'm not sure I could have predicted how well that would turn out for Python, and how poorly for Perl. Readability and ease of use matters?
- QuesnayJr 6y agoI think it was really Perl 6 that killed it. Perl had a significant lead over Python, and the Perl 6 announcement just sucked the life out of it.
- NortySpock 6y agoSo it's the Osborne effect? Where you stop using Perl 5 because you're waiting for Perl 6 (announced in 2000, released never? As Raku? As a rolling release? The history appears confusing in Wikipedia.) https://en.wikipedia.org/wiki/Osborne_effect https://en.wikipedia.org/wiki/Osborne_effect
- dragonwriter 6y agoPerl 6 was released as language spec and on the Rakudo implementation; the rename to Raku was kind of a backformation from the name of the Rakudo implementation, but it was after the first stable release.
- lizmat 6y agoPerl 6 had its first official release in December 2015. It has since been improved, mainly in performance and in async / event driven capabilities. It got renamed to Raku last year (https://raku.org https://raku.org using the #rakulang tag on social media). You can check out the Rakudo Weekly News if you want to stay up-to-date: https://rakudoweekly.blog https://rakudoweekly.blog
- Ultimatt 6y agoWhat was the 2010 Rakudo Star release then? Is 2015 language spec stability?
- banana_giraffe 6y agoThey last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.
- freyfogle 6y agoyes, definitely. If you are manipulating text, Perl is great.
- politelemon 6y agoYes... We have some high revenue, important contract type systems written a long time ago and maintained by the same subject matter experts who simply move the codebases (old and new) to newer systems and stacks. As you can tell, the SMEs have no interest in learning other things and so any new initiatives that require them to implement it is subject to their preferences.
- hinkley 6y agoMany places don’t support antifragility. Having an old system that nobody wants to rewrite may not be a reflection on the engineers. You’re an expert, and a rewrite is going to expose you to a lot of scrutiny. You are going to break things, when maybe you haven’t broken things in a long time and people like it that way. So when some day arrives where a new fad is hot and it’s hard to impossible to find Perl programmers, the will create a new team to rewrite it badly because now they have no other choice. And of course the new folks are going to screw up, but that’s just expected.
- gmmeyer 6y agoThere's no need to rewrite a system that works and that you're not gonna change. While programming languages go out of fashion there will always be people who are capable of writing them. The median age of a cobol programmer has not changed in 20 years because more people keep learning the language. Demand in this case, will likely create its own supply.
- CJefferson 6y agoOnce this is out, I'll be interested in any well written guides or books, it has always felt like "the one that got away" to me. Back in 2002 I had to choose between learning between Python and Perl for a project, but "everybody knew" Perl 5 was soon going to be replaced by a new shiny different Perl 6, so I chose Python. It will be interesting to see where Perl can live and gain new users nowadays. Python has so much become the "default scripting language", and has so many bindings and libraries.
- nchelluri 6y agoI think you can learn most/all of Perl 5.32 with http://modernperlbooks.com/books/modern_perl_2016/ http://modernperlbooks.com/books/modern_perl_2016/ , and it appears this is, initially, going to be 5.32 with some saner defaults. So you could really start now, given that. > This beloved guide is now completely updated for Perl 5.22. I've been working with Perl since about 5.20 and am on 5.31 or 5.32 and haven't noticed many breaking changes FWIW.
- chromatic 6y agoThe 2016 edition covers most of what's in 5.32; if I were to do an update for Perl 5.32, I'd include postfix dereferencing and the built-in function signature mechanisms now that they're very stable and supported.
- mprovost 6y agoThe Osborne effect for languages. Now there's no risk in announcing version 7 since effectively everyone who was going to choose Perl already chose Python (or Javascript). https://en.wikipedia.org/wiki/Osborne_effect https://en.wikipedia.org/wiki/Osborne_effect
- DonHopkins 6y agoThere's also the Ozzy Osbourne effect for programming languages: I've listened to preachers I've listened to fools I've watched all the dropouts Who make their own rules One person conditioned to rule and control The media sells it and you live the role Mental wounds still screaming Driving me insane I'm going off the rails on a crazy train I'm going off the rails on a crazy train
- h2odragon 6y agoGreat. Perl is not my favorite language, but the things its good at and the body of nifty code out there deserve more recognition than they get. Hopefully this will remove some of the discouragements to curiosity that have kept people from looking harder at perl to see if it fits their problems or their mind better than other tools.
- nchelluri 6y ago> PHP went directly from 5 to 7, and isn’t it time to steal something from that community? :D
- anon776 6y agoThere was a php6... we just do not talk about it. There is a perl 6 also.
- dragonwriter 6y agoThere was a perl 6, but it is no longer perl, though it's still 6.
- lizmat 6y agoNo, there isn't. Perl 6 got renamed to Raku (https://raku.org https://raku.org using the #rakulang tag on social media). There's a weekly blog post should you want to stay up-to-date: https://rakudoweekly.blog https://rakudoweekly.blog
- Ovid 6y agoJust to be clear to everyone: this doesn't break anything. If you continue to use Perl version 5, you're fine. If you want to upgrade your major version of Perl, then of course you need to know what that means.
- briandfoy 6y agoTo clarify this: if v5.32 can run your code, you should be safe. There have been various small changes in Perl 5 that might not handle something you wrote in 1995.
- richard_todd 6y agoI love perl, so I’ll definitely spend some time tonight trying to find out more about the plans. From just this article, it’s hard to see how this is different than just making ‘use v5.34;’ flip some switches. That’s just business as usual in modern perl, even if it changed more things than normal. Still, if bumping the major version gets people to take another look at it, it will be a good thing. And maybe there are bigger plans post-7.0 and this is just to ease the initial move.
- haolez 6y agoThey are making some space for (controlled) breaking changes. It also sends a message that Perl has a clear path going forward. I'll consider it for my next projects, especially the automation ones.
- bhaavan 6y agoThis feels like a last ditch attempt to save a dying language. (https://i.imgflip.com/4676mf.jpg https://i.imgflip.com/4676mf.jpg) I wonder what exactly does Perl bring to the table as a language, why would one consider choosing it over other languages.
- jrockway 6y agoPeople are interested in using it and people are interested in developing it, so it continues to be used and developed. I got my start with Perl; I wrote a book about it, I spoke at every conference, I did training, I maintained the Emacs mode. I started working at Google and, forced to use static languages, found them to be just as productive as Perl. And, they eliminated a lot of problems with Perl -- libraries were resolved at compile-time, and I just ended up with a binary that could be run anywhere (no @INC madness); types were checked at compile-time, so silly errors that required extensive unit testing in Perl could just be automatically underlined by my editor and fixed before I even saved the file. Something else that bothered me was how much mindshare the dynamic languages were competing for among themselves. I would prefer to write a Perl program over a Java program any day... but Perl did not seem to be fighting with the Javas and C++s of the world, instead it was always trying to take on Python and Ruby. And Python and Ruby were like that too -- every Ruby programmer was out to kill Perl because they didn't like Matt's Script Archive. (Nobody wrote 1990s Perl in the 2000s, so it was kind of a strawman.) You ended up with a bunch of like-minded people fighting for the small attention share of "we don't really care about runtime performance", and all the factions were just too small to take on the larger issue of entrenched static languages. Java and C++ never felt like they had to take features or ideas for Perl, Python, or Ruby. So it all seemed kind of pointless. With all that in mind, I do think Perl failed to "win". It is a neat programming language, but probably too complicated for beginners and not productive enough for people that have gotten comfy with C++/Java/Go, which are pretty darn productive these days. Meanwhile, Python found its niche pretty much everywhere -- you can program microcontrollers with it, you can write a video sharing website with it, you can do data science with it -- and it's a great introduction to programming for beginners. And, Javascript kind of came out of nowhere to conclusively "win" the dynamic language war (because a dynamic language needs a runtime, and guess what runtime exists on pretty much every computer and phone around these days?) TL;DR: I kind of agree that the programming language wars have been fought and lost by Perl. That doesn't stop people from wanting to make it better, or to continue to use what they know. You can make lots of great things with it, so people continue to use and improve it.
- r00fus 6y agotl;dr - Perl 7.0 is going to be v5.32 but with different, saner, more modern defaults. Perl was great 20 years ago for basic scripts. Where is it still used today who hasn't transitioned to Python/etc?
- toast0 6y agoPerl continues to be great for basic scripts. Why change and throw away 20 years of experience? The only thing I've noticed that's lacking is decent protobuf support.
- radiator 6y agoSome people would consider that a good thing.
- toast0 6y agoI assume you're saying it's a good thing there's no reasonable protobuf support? The problem is I have access to data I'd like to manipulate, but it's in protobuf, so my options are: a) somehow convince Google to let me access Nest data through a proper API b) get a different thermostat c) magically get the perl protobuf libraries to actually work d) write just enough protobuf parsing (and possibly generating) to read my data, and curse e) use another language to parse the data (ugh) (I guess you could like to throw out 20 years of experience)
- smueller1234 6y agoI think what you're looking for is this: https://metacpan.org/pod/Google::ProtocolBuffers::Dynamic https://metacpan.org/pod/Google::ProtocolBuffers::Dynamic
- cutler 6y agoMost of Perl's virtues were inherited by Ruby, not Python. Hell, Python doesn't even have a regex operator.
- srathi 6y agoPerl readability is rivaled only by c++ template code!
- fizixer 6y agoNeed a comprehensive, up-to-date, yet brief, status of what happened to Perl 6 and where it stands in today's s/w tech.
- Floegipoky 6y agoPerl 6 is basically a totally different language than any other Perl, and it took a very long time to go from announcement (2000) to release (2015). It was renamed to Raku last year.
- cutler 6y agoString parsing - Perl5's forte - is still dog slow with Perl6/Raku and year after year we hear that will change in the future. Don't hold your breath.
- daotoad 6y agoRaku's big strengths lie, IMO, in the command line scripting capabilities (the MAIN function), parsing with grammars and powerful new regex syntax, and as a glue language. It's relatively easy to bind to external libraries and work with them. Look at how easily raku binds to a python charting module in this article: https://www.perl.com/article/plotting-with-perl-6/ https://www.perl.com/article/plotting-with-perl-6/
- fmakunbound 6y agoAccording to the Modern Perl author, Five things Perl (Still) Gets Right: * Compatibility * Quality * Usability * Scalability * Availability https://pragprog.com/titles/swperl/ https://pragprog.com/titles/swperl/
- timwaagh 6y agoMostly the last one. It's included by default with most linuxes and cygwin. So even if your boss hates you and doesn't let you install anything you can still write scripts.
- foobar_ 6y agoThis is just bad maintenance. Just pick all the stuff people are complaining about and fix it! 1. Improve threads 2. Improve C API support 3. Give local::lib, cpanm by default ... multiple perl versions by default 4. Give direct support for coroutines / async await 5. Mark experimental features as non-experimental (attributes, signatures) 6. Pick an OO system, package system 7. Make switch cool again 8. Get more core modules or remove some. Give more visibility to cool perl modules. like PDL or something. 9. Improve GUI toolkit, Web Deployment and Web Assembly support 10. Improve look and feel of community sites Heck break some backwards compatibility with Perl4, get rid of format.
- noisy_boy 6y agoOne more: add a proper exception handling setup.
- foobar_ 6y agoYeah that too! People keep saying perl is a bad language or something and the other languages can't even get implementing closures right. I've always liked the references syntax, probably the most complained about feature. Its just pointer thinking. You could probably collapse `$array[$x]->{"foo"}->[0]` to `$array[$x]{"foo"}[0]` and save some keystrokes.
- mfontani 6y ago> probably collapse $array[$x]->{foo}->[0] to $array[$x]{foo}[0] ... Yup, one's been able to collapse exactly like that for more than twenty years. https://metacpan.org/source/LWALL/perl5.002b3/pod/perlref.pod#L289 https://metacpan.org/source/LWALL/perl5.002b3/pod/perlref.po... That's from 5.002, from last century, and it wasn't introduced on 5.002. Beginning from v5.20, one's also been able to use the postfix dereference syntax, turning: say join "\t", @{ $foo->{bar}[0]{quux} } into: say join "\t", $foo->{bar}[0]{quux}->@*; Whether that's better or worse, it's debatable.
- foobar_ 6y ago
- frjalex 6y agoAfter a million years, it is finally out!
- peterwwillis 6y agoThis is possibly a stupid comment, but I'd love a modern language whose expected lifetime is 100 years. A language whose specification details how it can be run for 100 years on changing hardware + operating systems, and is built with the least amount of, and easiest to perform, maintenance in mind. Those languages kind of exist, but not expressly written as such. C will outlive us all.
- billman 6y agosub foolOnce() { return raku(); } sub foolTwice() { return perl5(); }
- cutler 6y agoYou left-out unrolling @ :).
- OakNinja 6y agoDevelopers in their forties wrote Perl. Developers in their thirties replaced Perl. Developers in their twenties say “What’s Perl?”
- cutler 6y agoYes and developers in their 50s retired in their mid-30s after making fortunes writing Perl.
- davorg 6y agoI wish :-)
- mrtweetyhack 6y agoYes, they also retired writing assembly, C, Pascal, Fortran. Doesn't make it a good language
- lizmat 6y agoDevelopers in their teens say: Wow, Raku! https://raku.org https://raku.org (formerly known as Perl 6)
- daotoad 6y agoI'm in my late 40s and say "Wow, Raku!". I haven't used it for anything work related yet, but working with it is mind expanding and makes me a better programmer in whatever environment I work in. The type system, multiple dispatch, literate programming support, and command line scripting features are simply amazing.
- totalperspectiv 6y agoI am not yet 30. My first job was all Perl. I really hope this bumps Perl back into the niches where it excels. Because there are definitely areas where it is the sharpest and best tool for the job.
- elchin 6y agoWhat project, if you were starting now from the scratch, would you use Perl for?
- superkuh 6y agoAny project that runs on a computer (not a microcontroller) that doesn't need a hardware accelerated multimedia. But even if the later you can always use sdl2. My last three perl projects (not counting throwaway minor scripts): The control interface of a galvanic vestibular stimulator for VR motion sickness. A GUI for doing the required quirky edits to text files for text to speech smoothness. A comment system for a static website.
- jwr 6y agoMuch as people complain about Perl, it is the language which I use when I want to have something which will run 10-20 years from now. I recently wrote a consistency checker for file archives (so that I know when bitrot sets in) in Perl, precisely because I want it to be usable for a long time (https://github.com/jwr/ccheck https://github.com/jwr/ccheck). Very happy to see a path forward for Perl 5.32.
- boring_twenties 6y agoPerl is still unmatched for one-liners, and by extension, one-liners that graduate to short scripts.
- cutler 6y agoYes, of all the Perl books in my collection Tim Maher's "Minimal Perl" (Manning) is still the one I dip into regularly.
- boring_twenties 6y agoThinking about this some more, I now feel really sad for anyone who doesn't use perl (i.e., almost everyone). Its immense power at the command line is something they'll never experience. Nothing today even comes close.
- cutler 6y agoEven sadder that no-one will probably now start their programming career, as I did, with Perl as their first language. I feel honoured. At the time it was a toss-up between Java, which my house-mate was using every day to write banking apps at work, or Perl - that funky linguistic creation which granted you magical powers. No contest.
- jeffhuys 6y agoI don't understand what you mean exactly – couldn't you use any language, even javascript, exactly the same version as you use right now, in 2100? Why not? Edit: nice tool, by the way!
- ksaj 6y agoAre they still renaming Perl 6? I think it is a tad confusing to have 5 and 7 being so similar, and the 6 in between so radically different. I can't be the only one.
- filmor 6y agoPerl 6 was renamed to Raku in October 2019.
- ksaj 6y agoAh, I am glad the name change happened. I got side tracked before it came to a conclusion. I'm guessing if it didn't happen then, it surely would have to be changed now because of this new version, which looks like far less of a fork in the road. I know some people aren't fans of Perl5, but it's what I learned and I wasn't all that excited to have to toss everything I knew (and my reference books) just because of a new version number. If Perl6 turns out to be complementary as people were saying/hoping, maybe Perl7 is where we get to see the interplay.
- lizmat 6y agoPerl 6 has been renamed to Raku (https://raku.org https://raku.org using the #rakulang tag on social media). You can run Perl inside of it if you want to, with the Inline::Perl5 module. Check out the Rakudo Weekly News https://rakudoweekly.blog https://rakudoweekly.blog if you want to stay up-to-date!
- ksaj 6y agoI'm surprised to see .pm6 extension still being used, at least on the rakudo documentation page. Do those contain Raku code, or Perl?
- lizmat 6y agoThese would contain Raku code. But as with Perl, the core developers value backward compatibility much. Since many versions of Raku in use do not know of the new .rakumod extension yet, the old extension is used for many modules still. This is probably going to change in the next language revision of Raku. See https://github.com/Raku/problem-solving/blob/master/solutions/language/Path-to-Raku.md#extensions https://github.com/Raku/problem-solving/blob/master/solution... for the nitty gritty.
- Ovid 6y agoAs a short summary about Perl 7: If your Perl is old-school, that's OK. Use Perl 5 and we'll keeping supporting you. If you your Perl isn't old-school, use Perl 7 and get new features. If you're not sure, ask us and we'll hold your hand to help you understand. We're here to make sure you're OK.
- aduitsis 6y agoAny chance Cor makes it into Perl 7?
- lizmat 6y agoI understand that to be the plan.
- sundarurfriend 6y ago> ask us What's the best way to do that these days? IRC was the most active Perl place back in the day and the best place to get help, where's the best place for people to ask for help these days?
- cafard 6y agoI have used Perl since the Perl 4 days. One can write bad Perl, and I've written a lot. One can write good Perl, and I've written some. It has saved me and others quite a lot of time on assorted projects. These days I tend to use Python where once I'd have used Perl. This is mostly because I find that the young are far more likely to know Python than to know Perl. I will be retiring one of these days, after all.
- alexpotato 6y agoFeel the same about the above. I would add that Perl is still the best for one liners since you don't need to "import" key packages to do basic work e.g. you can regexes in a Perl one liner with no imports.
- sqrt17 6y agoI'm not anywhere retiring yet, but when Python came around the corner, I thought, well it's as well-suited as Perl for larger things (i.e. not one-liners for text processing - those are a reason for keeping Perl around) but with a cleaner structure. And that was at a time where you still (occasionally) had to write your own string replacement function that a weirdo company-specific BASIC dialect didn't have. There's never been a language that I thought of as "Python, but with a cleaner structure", even though Go may be something like "Java 1.2 but with a cleaner structure and a fast toolchain"
- hyperbovine 6y agoI don't think it's necessarily generational. Perl and Python differ in a key regard: Perl went all in on TIMTOWTDI, whereas Python went in the complete opposite direction: enforced whitespace, minimal syntax, strong use of conventions and idioms. (When was the last time you heard somebody inquiring about the Perl-ic way to write something?) As a result, a lot of Perl code is an unreadable mess, and many Python programs are intelligible even to non-programmers. It's hard to overstate what a win this is for Python.
- swimfar 6y agoTIMTOWTDI="There is more than one way to do it"
- senthilnayagam 6y agoPerl 6 with parrot VM was expecting release in 2004, we had some portion of our code in perl. other portions were in php4. chose ruby due to rails announcement in 2004. will wait for actual release will try on some pet project
- lizmat 6y agoPerl 6 actually got released in December 2015. Meanwhile it got renamed to Raku (https://raku.org https://raku.org using the #rakulang tag on social media). You don't have to wait anymore to be able to use it on a pet, or even a business project. Check out the Rakudo Weekly News if you want to stay up-to-date: https://rakudoweekly.blog https://rakudoweekly.blog
- mrits 6y agoI've had to write some Perl in my latest project. Coming back to a language 20 years later at 37 years old was very interesting. I'm not a fan of the language but I can see why people like it. The largest issue I've had is that even though the ecosystem gives you the ability to write code resembling best practices, I don't see a lot of Perl programmers that do it. Coming onto a project it didn't make sense to catch a whole team up on 20 years of best practices. So I went about writing code that would never be accepted on most of my other teams.
- rplnt 6y ago> > use utf8; > there’s still much to be done to make Unicode the default Why's that? If that's something someone with zero Perl experience can easily understand. Isn't this only about the source code? Or does this mean all strings are unicode?
- moonchild 6y agoThis[1] explains it. Essentially, to support unicode probably, you have to do extra work in your own code. (How do you handle invalid unicode? Should regex character classes match the unicode versions, or just the ascii versions? etc.) Additionally, certain builtin functions don't already support unicode, and modifying them to do that would be a breaking change. For more info, see the py2->py3 unicode change, and how much of a mess that caused. 1. https://stackoverflow.com/questions/6162484#6163129 https://stackoverflow.com/questions/6162484#6163129
- ashton314 6y agoMy very first program was: perl -e 'print int rand(10);' Good times. Good times. :) I wrote a lot of Perl. I even wrote a small LISP interpreter entirely in Perl! These days I write more Racket and Elixir, but there's still a soft spot in my heart for Perl. I hope this will breath some fresh life into the language. I think it has a lot of interesting ideas about language design that new languages would do well to copy. Perl is (in)famous for all the shortcuts possible in the language. While this does steepen the learning curve, I think there are some valuable ideas worth exploring. The implicit topic variable (`$_`) is super nice when throwing together a little script. The semantics are well laid-out in its documentation. I think an improvement would be to somehow make it more clear directly in the language itself where the topic variable is used. Maybe that's what I'll end up looking at in some research. :) Lots of languages, I feel, optimize for readability for beginners. (I'm thinking about Python and Go here.) Perl is optimized for people familiar with the language. I think that can be a good thing, if done right. What do you guys think?
- _____smurf_____ 6y agoIn some companies, they have huge projects written in Perl
- qalmakka 6y agoPerl is the swiss army knife of the shell. Works the same everywhere, it has always been reliable and superuseful for simple to medium scripts. It's the glue that keeps a lot of stuff together, and I'm happy it got back to its tracks after the v6 faux pas.
- qbaqbaqba 6y agoReasonable since "perl6" issue is solved. Everyone may move forward.
- markstos 6y agoPerl is alive!
- oarla 6y agoI worked on Perl for a while, liked it. Back in 2008/9, the only option for Perl on Windows was Activestate Perl, whose community version was missing lot of features that would have made it much less painful(I am thinking of PPM particularly). That was one of the biggest gripes I had with Perl. We moved everything to Python as soon as we could get comfortable with it and haven't looked back since. Regarding Perl's one liners, I feel they are what makes Perl very useful, but my preference is AWK over Perl for that.
- kbenson 6y agoI actually found ActiveState and ppm to be fairly useful when I was doing cross system Perl around the same time. You could get the same ActiveState versions for Linux and Windows and have a more consistent environment. In the few cases ppm didn't have what I needed, I would just use a CPAN client. Pretty sure I even got the CPAN client compiling some libs for windows (which took a bit of work, but wasn't impossible). I even used that setup to package a couple Perl scripts with all their modules into PAR archive executables, circa 2011 I think. > Regarding Perl's one liners, I feel they are what makes Perl very useful, but my preference is AWK over Perl for that. I love the ability to pull in a CPAN module or two to really kick up a one-liner a notch without making it too long. Also, I like creating an alias to perl that loads up a few useful libs and the main project lib and putting it in the project path so I can use a one liner like a REPL and run small queries, reports, or even do complex DB queries/updates with it using DBIx::Class and all the helper methods I've created for this project's schema.
- polynomial 6y agoAmazing. I literally first installed this on my laptop over 10 years ago. (Using Parrot)
- lizmat 6y agoIf it was using Parrot, you probably installed Perl 6 (at the time, now known as Raku).
- polynomial 6y agoAh you're right, it was 6. Amazing to see Perl still going after all this time!
- iso1631 6y agoWow, I haven't written any perl since checks 5.27 pm today.
- Scarblac 6y agoPerl has these tiny neat features that I still miss in other languages. Like unless (opposite of if), and postfix syntax. print "It worked!\n" unless $error; print "Item: $_\n" foreach @items;
- singingfish 6y agoUntil some joker writes an unless/else block. Gah. I hope someone implements an elsunless keyword /s
- kbenson 6y agoI've never been a fan of unless blocks (as opposed to the unless postfix, which is a bit easier to swallow). The lower precedence spelled out boolean operators (not/and/or) mean you can just use if not instead, which is just as readable in most cases and isn't confusing in the else case. e.g. unless ( $foo ) { } if ( not $foo ) { }
- singingfish 6y agoyeah I tend to avoid unless - definitely in blocks, but it's ok for some postfixes
- jlokier 6y agoI find this: error "The eggs are not in their basket" unless $eggs_in_basket; clearer than this: error "The eggs are not in their basket" if !$eggs_in_basket; because "unless" is more visible than "!", and because the condition indicates the "normal" case. I agree that unless/else blocks are quite unhelpful. The double negative doesn't help. That said I am guilty of writing some unless/else blocks, but the reason is always performance. "unless ($x)" is faster than "if (!$x)". Only one opcode faster, but in something optimised for speed that's a few percent, and therefore a goal, especially if there are many of them. For something like "++$y unless $flag" it's more than a few percent. As with many other things in Perl, and other languages in the "slow" class (Python, Ruby etc), there are no dataflow optimisations. Things like "my $x; $x = 1" are slower than "my $x = 1;". Yet still there are times when something is worth doing faster, without the big jump of rewriting in a different language. That's completely different from the "fast" languages, like C, C++, C#, and nowadays JavaScript. I've come to appreciate that I wish all languages did trivial dataflow optimisations and inlining, even if they are in every other respect interpreted languages, because absence of dataflow motivates people to write uglier and more difficult to understand code in tight hotspots, when code clarity would be really valuable.
- adenozine 6y agoWhat is there to gain in calling it Perl 7? It seems needlessly disruptive, rather than just calling it 5.34 or whatever is next.
- tux1968 6y agoIt's reclaiming the Perl name since Perl 6 has abandoned its connection to Perl and is claiming to be a completely separate unconnected language. This is the logical conclusion to this divergence and will mean that going forward people wont think Perl 6 is the newest version of Perl. That problem would still exist if you leave Perl at 5.35 since search engines are still happily returning pages for Perl 6 even though it's no longer a thing.
- sergeykish 6y agoIt is to resolve question of Perl 5 continuity. Something that Python 3 has not accomplished.
- EricRiese 6y agoYou guys are just now getting to Perl 7? I'm already on Perl 11. http://perl11.org/ http://perl11.org/
- lizmat 6y agoThe Perl 11 initiative was started by some individuals in the Perl community, but it never gained much traction outside of the group around the ones that started it. It has been dormant for at least 8 years now.
- henearkr 6y agoI had hope there would be a merging (with some compatibility layers and wrapper binaries) allowing to use Raku the same way Perl 5 was used (should not have been _that_ hard, just adding familiar options and special variables)... Now I'm seeing this goes in a total different direction.
- lizmat 6y agoPerhaps. Meanwhile, the most recent release of the Inline::Perl5 module of Raku allows one to have code blocks written in Perl inside Raku code, and vice-versa. And of course be able to use any CPAN module from Raku: https://modules.raku.org/dist/Inline::Perl5:cpan:NINE https://modules.raku.org/dist/Inline::Perl5:cpan:NINE
- henearkr 6y agoNice! I didn't know. But it still does not bring back the classic usage in Perl 5 style, that made intensive use of runtime options as shorthands for looping on all lines of a file etc.
- mgarfias 6y agoomg why
- gkfasdfasdf 6y agoI still use Perl every now and again for powerful one-liners and I'm really glad it's around. Here is a bash function I use which takes args and merges and deduplicates PATH-like expressions: merge-args () { perl -e 'print join ":", grep {!$h{$_}++} split ":", join ":", @ARGV' "$@" } And I use as follows: export PATH="$(merge-args "${SCRIPT_DIR}"/clang-tidy-ex /usr/local/opt/llvm/bin "${INSTALL_DIR}"/{,samples/}bin "${PATH}")" ASAN_OPTIONS="$(merge-args "${ASAN_OPTIONS}" detect_leaks=1 check_initialization_order=1 detect_stack_use_after_return=1 strict_init_order=1 strict_string_checks=1 detect_odr_violation=0)" I know there are other ways of doing this in other languages and even in bash itself, but to me this is simple and elegant.
- Spivak 6y agoA pure bash alternative for comparison. merge-args() { local res for i; do case ":${res}:" in *:"$i":*) ;; *) res=${res+$res:}$i esac done echo $res }
- gkfasdfasdf 6y agoThat is pretty neat, I did not know that 'for i' on it's own could iterate the args like that.
- newshhh 6y agoPeople just keep wasting their precious lives on archaic stuff that has no future. Perl is dead. If these smart minds want to contribute to humanity, they should abandon this sunken ship and move to something more meaningful.
- yellowapple 6y ago> Perl is dead. Seems like DuckDuckGo didn't get the memo.
- py_or_dy 6y agoI've been a perl zealot since 2005. I didn't even know "python" existed until around 2008 when I found a script file with a ".py" file ending in a fresh ubuntu install. I started going to perl conferences sometime after 2010 when someone on irc informed be about them. I learned so much in those conferences, mainly about the alternatives to cgi and the modern OOP "framework" named "moose". I thought I was in heaven. I landed my first devops position around the 2010 era as well and being the only one on the team that really knew how to "program", I spammed out tons of perl scripts and web apps. A few years later one of the newer employees on the customer support team started spouting off about "python" and how it was so easy to learn. He was always blabbing about terms I'd never heard of like "generators", "list comprehensions", "decorators", etc. I looked them up and learned they were just abstract constructs with fancy names that are supported in most any language. So I just figured he was some idiot that didn't really know anything. Otherwise, why would you be blabbing about abstract constructs? He quickly landed a job at google and I left and started freelancing only picking up perl jobs. Because perl was "dying" and this being after 2012, there were several companies with large perl bases that couldn't find local employees so were forced to allow remote workers. This is where stuff started going wrong. I went through many jobs/gigs my first couple of years. I quickly noticed that companies that had large perl code bases were all founded pre-2005. This meant it was crap perl, in most cases not even using CPAN but having home grown ORM's and web frameworks and a scrict hate of javascript. So it mostly sucked and was slow going. In one case I was literally fired after a couple of months from this one company that specialized in phone billing accounting software (all perl powered) because I was "too slow". The owner told me he should have never hired someone with less than fifteen years experience with perl and bid me farewell. I almost busted out laughing as for the entire two months I was only doing javascript front end work since the other perl guys there hate javascript. Even the owner of the company had no clue how his own software worked. This was a theme that repeated it self else where as well. Fast forward a few more years and I had landed a good remote job, still in perl but offered more freedom in the dev cycle. I got good with react and vue.js as it greatly speed up the dev time for all the heavy interactive apps I was tasked with. But I continued to struggle against others in the perl community. I can understand how a 50 year old perl dev (the typical age) would hate javascript and instead put as much code in the back end using all kinds of horrid html templates and never ending form post/refresh/repopulate cycles... I can see the "why should I learn javascript if i know perl" ideology, but what blew me away is a constant "why should I learn SQL if I know perl" ideology. Yes I'm serious. In so many other cases devs were fine with just doing "select *" on tons of tables and stuffing all that in a hash/dictionary of column name matching keys. Databases were big, scripts and page load times would grow to minutes or even hours. Sometimes exhausting the machine's ram and crashing everything. Everyone was fine with it, management just acted like it's how things work. Meanwhile as a co-worker, I'm left digging through pages of perl code that could have just been a single SQL query trying to figure out why some numbers are wrong in an invoice report. It was a continual issue. Another issue is just the bit rot of cpan. The ORM and drivers for both postgresql and sqlite don't even support most of the features added in those systems since 2014. So even though postgresql is the most advanced DB out there, you are stuck with no ability to use any of the fancy native array or json types or even the "natural" join syntax (and many other things), neither good support for foreign keys in sqlite either. I've thrown my hands up and jumped ship. It's sad too. I liked many in the community and like Larry Wall as well and have had dinner with him on several occasions. But I can't keep my sanity and stay with perl. I can read perl fine, it is not the notorious "write only" language that many troll it to be. But the issue is the community and those using perl daily are fine with being stuck in 1995. Larry Wall stopped adding features to perl in 2002 (?) and moved to perl 6 which.... well how do you even describe that? The point is, perl has been the same since 2002, mean while python has had continual development and features added every year since then. I'm just done.
- tolger 6y agoThis is great news! I was really excited about Perl 6, until I realized it was a different language, and it never quite jelled into a usable thing. So I kept using Perl 5. I write mostly modern Perl code, so this is exactly what I wanted. I learned Perl back in the late 90's when it was the best way to do web programming. As a C programmer, it was a breath of fresh air. It was a higher-level C for me and I used it for prototyping all kinds of things before writing the production level C code. Nowadays, I still use it for system maintenance and prototyping. It's a great language and very powerful tool.
- Animats 6y agoThus the embarrassment of Perl 6 is erased from history.
- lizmat 6y agoPerl 6 may be erased. But the Raku Programming Language (https://raku.org https://raku.org, using the #rakulang tag on social media) rose from its ashes.
- rad_gruchalski 6y agoPerl 5 was great. Written so many things in it. Looking forward to 7. Maybe time to start doing new things in perl?
- jVinc 6y agoI'm sorry if this offends. But a complete laypersons* perspective from someone who hasn't been keeping up on the current perl ecosystem is this: perl6 failed to the degree that perl 5 became perl 7, while all the perl programmers switched to ruby or python. Am I wrong? *ok, not completely layperson, I used perl a lot a decade ago an have spent a week playing with raku at one point, but nothing in my professional life even has a slight smell of perl anymore, which is strange seeing as 90% of our company codebase was perl 15 years ago.
- lizmat 6y agoPerl 6 / Raku did achieve its goal of a programming language that kept all the good parts of Perl, and remove it warts, making it ready to become the 100 year programming language. In my opinion, the failure is in the timing of the process, and keeping the Perl community involved in the process.
- eruci 6y agoI write perl professionally as of June 2020 (and I have been writing software in Perl since 1999). Never felt the need to use Python, or any other language for anything I do. People who use my (mostly) Perl based software on AWS and GCP Marketplaces today are somewhat surprised and/or even taken aback when they find out it is written in Perl. So, I try not to mention that.
- rodrigo975 6y agoFinally!
- edw 6y agoThis article touches on something that I really enjoyed about (the early days) of Perl 5, and I think it may body well for the future of the language. You could write Perl 5 like it was just a better Perl 4. All of the craziness with modules and references was hidden to you if you wanted to write a Perl 4-esque script that needed to talk to a database or do something else that you could find a module in for in CPAN. The people would wrote those modules, God help them, I don't know how they managed to write the executable line noise that was in the source, but I didn't care. I could get my job done with a few simple `use` statements.
- ojosilva 6y agoThe proposed defaults are a good idea, and I hope some or most of 5.32 long standing experimental features become core features (or just go away entirely). But I'm afraid that the badly needed core C code refactoring and restructuring is being left out, and that will make it very hard to introduce new features into the language. I also had this secret hope that Perl 7 would be a tidier, simplified Perl 5 with little or no relation to Perl 6. Less confusing syntax would go in sync with the refactoring of the core to create a smaller language that could perform better and be easier for beginners to learn.
- redis_mlc 6y ago> I also had this secret hope that Perl 7 would be a tidier, simplified Perl 5 with little or no relation to Perl 6. That's what the article says. > could perform better Perl's performance is not an issue.
- jasonhansel 6y agoWhy does this happen so often to certain language version numbers? ECMAScript 4, PHP 6, and now Perl 6.
- peteretep 6y agoSecond system syndrome
- sergeykish 6y agoNetscape 5, Windows Longhorn
- pflanze 6y agoMaybe someone here is the right person interested in this: I've been working on making Perl more suitable for functional programming[1]. This project still needs a lot of manpower to become something good. I need people to work with me on this, I won't continue alone. Please give me feedback about where I should be going with it, or tell me if you're interested in joining the effort. [1] https://metacpan.org/pod/FunctionalPerl https://metacpan.org/pod/FunctionalPerl
- sabujp 6y agoPerl5 was the first language in which I actually did some substantial projects. It was also heavily used in scientific computing (esp. genetics) until python came along.
- p1necone 6y agoI'm trying to work this out but not having much luck - Perl 6 was a "lets make a bunch of breaking changes and modernize Perl a bit", and now that's branched off as a new language called Raku. Now there's Perl 7, which is sort of the same idea as Perl 6 was, but less radical with the changes? Are the same people working on both? Is Larry involved with both?
- triangleman 6y agoI believe it's not radical at all compared to the Perl 6 idea. It's basically "strict Perl 5" if I'm reading it right. If Larry had said from the start "Let's make a new language and call it Raku" we would have had Perl 6 long ago, it would have been called Perl Enterprise Edition in the business world, and you'd never have heard of Python or PHP because everyone would be using Perl. Oh well, better late than never.
- lizmat 6y agoLarry has not been involved with Perl 5 for the past 20 years, and not in Perl 6 for the past 3 years or so.
- classics2 6y agoGlad to hear it. Perl 6 was some kind of twisted complexity pornography.
- rurban 6y agoTo be on topic: Perl7 is basically the idea to modernize saner settings by default. And breaking backcompat where it hurts. But it's far off a modern perl, like cperl is. They failed to fix the worst historical design mistakes. The hashes, the OO, types, @_, attrs before signatures (which was a major breaking change, but they excused themselves by claiming it was experimental), and many more. https://github.com/perl11/cperl/issues/414 https://github.com/perl11/cperl/issues/414 Instead they are breaking indirect method calls. Thanksfully this will be not POSIX, so nobody will use it.
- odc 6y agoThis is fantastic news! I'm glad perl 5 is evolving again.