Perl 7 Announced

Last night at the Perl and Raku Conference in the Cloud, Sawyer X announced changing the main version of Perl from 5 to 7. Work is already underway, the new version will be released within a year. You shouldn't expect a lot of changes, in short: Perl 7 is still the same Perl 5.32 with modern default settings. You no longer need to explicitly include the features that you already use, they will be enabled for you!

What will be included?

There is no complete list yet, but strict and warnigs for sure! In the 7th release, the signatures will most likely remain experimental, they will not have time to enable utf8 either.

What will be disabled?

  • Indirect method call:

    {;
    package foo;

    sub new { bless {} }
    sub bar { print "Hello from bar()!n" x pop }
    }

    # Normal call
    my $foo = Foo->new();
    # Indirect call
    bar $foo 42;

  • Empty words (barewords) as descriptor identifiers (except for standard ones (STDIN, STDOUT, STDERR))
  • Pseudo multidimensional hashes in the style of Perl 4.

    # examples taken from perldoc perlvar
    $foo{$x,$y,$z}
    # actually means $foo{join($;, $x, $y, $z)}

  • Old prototypes in Perl 4 style. Now you only need to write like this:

    sub foo :prototype($$) ($left, $right) {
    return $left + $right;
    }

    First, a prototype that affects the compilation of calls, and then signatures that put arguments into the appropriate variables at runtime.

However, there will still be an opportunity to return everything back in bulk:
use compat::perl5;
Or one by one.

Perl 5.32 is moving into long-term support for 5 years or more.

Extended announcement from Brian D Foy: https://www.perl.com/article/announcing-perl-7/
TL;DR version from him: http://blogs.perl.org/users/brian_d_foy/2020/06/the-perl-7-tldr.html

Source: linux.org.ru

Add a comment