Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Monday June 29 2020, @08:43AM   Printer-friendly
from the out-with-the-old,-in-with-the-new dept.

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/


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by VLM on Monday June 29 2020, @06:24PM (2 children)

    by VLM (445) Subscriber Badge on Monday June 29 2020, @06:24PM (#1014194)

    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.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by maxwell demon on Tuesday June 30 2020, @12:48PM

    by maxwell demon (1608) on Tuesday June 30 2020, @12:48PM (#1014469) Journal

    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

    by Anonymous Coward on Tuesday June 30 2020, @06:06PM (#1014609)

    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.