Submitted via IRC for TheMightyBuzzard
This morning at The Perl Conference in the Cloud, Sawyer X announced that Perl has a new plan moving forward. Work on Perl 7 is already underway, but it's not going to be a huge change in code or syntax. It's Perl 5 with modern defaults and it sets the stage for bigger changes later. My latest book Preparing for Perl 7 goes into much more detail.
Perl 7.0 is going to be v5.32 but with different, saner, more modern defaults. You won't have to enable most of the things you are already doing because they are enabled for you. The major version jump sets the boundary between how we have been doing things and what we can do in the future.
Remember, Perl was the "Do what I mean" language where the defaults were probably what you wanted to do. In Perl 4 and the early days of Perl 5, that was easy. But, it's been a couple of decades and the world is more complicated now. We kept adding pragmas, but with Perl's commitment to backward compatibility, we can't change the default settings. Now we're back to the old days of C where we have to include lots of boilerplate before we start doing something:
[...]
This is slightly better with v5.12 and later because we get strict for free by using setting a minimum version:
[...]
Perl 7 is a chance to make some of these the default even without specifying the version. Perl 5 still has Perl 5's extreme backward compatibility behavior, but Perl 7 gets modern practice with minimal historical baggage.
Source: https://www.perl.com/article/announcing-perl-7/
(Score: 2, Disagree) by The Mighty Buzzard on Monday June 29 2020, @01:27PM (16 children)
Dude, if you want Python just use Python. There are plenty of us who know why Perl is way, way more useful for specific tasks. Perl6 staying in the formal release chain would have killed that utility.
My rights don't end where your fear begins.
(Score: 0) by Anonymous Coward on Monday June 29 2020, @01:42PM (2 children)
"Dude, if you want Python just use Python"
There are many many programming patterns that work in other languages that don't work in Python. Python is mostly useful because it is trivial to export C++ API's into Python. If it was even remotely near as easy in Perl, there would be no Python.
For the previous post, thanks, I will take a look at Raku. My issue is whether I can use a toolchain to make clean C++ API extensions in an interpreted language. This is the number one reason for using Python. It isn't faster or cleaner or easier to debug as most people claim because it requires way more orthoganality. So the #1 issue for me is: Can I take a C++ API, run a simple toolchain and make an interpreted language API.
In my experience that is the only practical reason to use Python over another language.
(Score: 2) by RS3 on Monday June 29 2020, @02:55PM (1 child)
IIRC, perl does pattern / string stuff better. I'm not doing enough coding to have a feel for this, but how does this factor in? https://www.infoworld.com/article/3563840/python-may-get-pattern-matching-syntax.html [infoworld.com]
(Score: 2) by The Mighty Buzzard on Monday June 29 2020, @09:05PM
If by "better" you mean "kicks the everloving shit out of the nearest competition", you would indeed be correct.
My rights don't end where your fear begins.
(Score: 1, Insightful) by Anonymous Coward on Monday June 29 2020, @02:54PM (9 children)
I like Perl, I like Python, and Raku blows them both to hell. As I said, it covers all of the territory occupied by Perl, Python, C#, and Java and most of the territory occupied by Scala and Haskell. The only place Raku isn't prepared to compete is maximum performance computing - C, C++, Fortran, ATS, (maybe) Rust. Even then, the Raku syntax for FFI is much easier to work with than XS.
The Perl6 name was a mistake, because nearly zero Perl5 code will run unmodified in Raku. It's a different language, and both Perl and Raku would have benefitted immensely if they had the foresight to label it that way from the beginning. But Larry Wall and co knocked this one out of the park.
(Score: 2) by The Mighty Buzzard on Monday June 29 2020, @09:07PM (8 children)
Raku isn't compared to compete in the place Perl is most useful: arbitrary text mangling, quickly coded.
My rights don't end where your fear begins.
(Score: 0) by Anonymous Coward on Tuesday June 30 2020, @12:32AM (7 children)
?? Perl has the amazing and significant advantage of much faster startup and lower overhead than Raku, and the even more significant advantage that it's rare to find a *Nix installation without it. And those are completely valid reasons to use Perl over Raku for a task.
But did you really think Larry Wall was going to try to make a language in the Perl family and kick text wrangling to the curb? That would be like having Guy Fieri and Mario Batali announce that they were going to collaborate on a new nail salon. Raku is excellent for text wrangling.
(Score: 2) by The Mighty Buzzard on Tuesday June 30 2020, @12:51AM (6 children)
I've used Perl6. Built an IRC bot in it a year or three ago here on our IRC server. It sucks all of the cocks for text wrangling compared to Perl5. It's not quite as ass licking as Python for the job but it's close.
My rights don't end where your fear begins.
(Score: 2) by maxwell demon on Tuesday June 30 2020, @12:45PM (5 children)
Not having experience with heavy text wrangling, I'd be interested what the issues were.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by The Mighty Buzzard on Tuesday June 30 2020, @02:40PM (4 children)
I have a bunch of beefs but I'll give you the one that takes the cake instead of listing them all out. In a world where nearly the entirety of programming languages has some manner of built-in or library-added support for PCRE, Perl6's regular expressions are bafflingly not Perl compatible.
My rights don't end where your fear begins.
(Score: 0) by Anonymous Coward on Tuesday June 30 2020, @05:57PM (1 child)
You can get PCREs in Raku with the P5 or Perl5 flag, but Raku moves flags to the front. See https://docs.raku.org/language/5to6-nutshell#Regular_expressions_(_regex_/_regexp_) [raku.org] So:
if $line ~~ m:P5/[aeiou]/
The breaking change was intentional, they figure Perl had revolutionalized regexes once and P6 could do it again.
(Score: 2) by The Mighty Buzzard on Tuesday June 30 2020, @09:46PM
They were wrong.
My rights don't end where your fear begins.
(Score: 2) by maxwell demon on Tuesday June 30 2020, @06:44PM (1 child)
So your issue wasn't that Perl 6 couldn't do it, but that the syntax was different to Perl 5?
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by The Mighty Buzzard on Tuesday June 30 2020, @09:45PM
No. Like I said, that was just the most hilarious beef.
My rights don't end where your fear begins.
(Score: 2) by VLM on Monday June 29 2020, @06:24PM (2 children)
If I don't care about performance I already use Ruby. Raku is pretty much "NIH version of Ruby".
Honestly I have severe problems using Raku and Ruby because the syntax is practically the same but not quite.
Quick trivia question to demonstrate the agony, which is proper Ruby syntax and which is proper Raku syntax? I just can't program in both languages without trying to write Ruby in Raku and Raku in Ruby, and there's more cool stuff out there for Ruby, so ...
bigassArray[5..10].join(',')
@bigassArray[5..10].join(',')
I like Perl and I like that Perl 7 is something like "lets take the modern perl book and shrink it from a book to a page".
I have a nifty book named "Modern C" which is unfortunately long as hell list of things not to do. There are languages where the "modern wtfLang" book would be a couple pages long at most. Clojure I guess.
(Score: 2) by maxwell demon on Tuesday June 30 2020, @12:48PM
I've never programmed in either Perl 6/Raku or Ruby, but the trivia answer is easy. The second one is the Perl6 version, as it has the Perl-typical "@" for arrays.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 0) by Anonymous Coward on Tuesday June 30 2020, @06:06PM
Obviously Ruby has a > 100x advantage when it comes to the list of available software already written in it, and it's a good language.
If I was just working on something because I needed to get it done for a job, or even a project a friend asked for help on, or some annoyance, I would pick the language that offered the quickest path to a maintainable solution. I pick Raku when I'm coding for fun. I would love for it to reach the point where it is the first tool I reach for to solve problems quickly and maintainably, but for now it's just my favorite toy.