Major version upgrade 'Perl 7' announced for the first time in about 25 years, backward compatibility with Perl 5 maintained
by
At the ' The Perl Conference in the Cloud ' held on June 24, 2020, the new version of the scripting language ' Perl ' ' Perl 7 ' was announced. Perl 7 is a modernization of Perl 5 with no major changes to the code base.
Announcing Perl 7
https://www.perl.com/article/announcing-perl-7/
Perl 7 will be almost the same as Perl 5.32, but it is more modern. Most of the ones already activated in the previous version can be used as they are. The reason for upgrading to Perl 7 rather than the new version of Perl 5 is 'to set a line between what we've done in the future and what we can do in the future,' says Brian Doe , author of Perl books. ・ Mr. Foy said. Also, the reason for upgrading to Perl 7 instead of Perl 6 is to avoid mixing with Raku , which was originally being developed as Perl 6. There are cases such as version upgrade from PHP 5 to PHP 7 as such version upgrade.
Foy said, 'Perl is a 'do what you intended' language, and in the early days of Perl 4 and Perl 5 it was easy to do. It became complicated.' Perl continued to add new pragmas, but due to Perl's backward compatibility efforts, it was not possible to change the default settings. Today's Perl says that you have to write a lot of pre-requisite code before you can do anything about it, just like in the old days of C.
These improvements can be seen in the Perl 5 minor updates. In version 5.12 you no longer have to use 'strict' by specifying a minimum version.
In Perl 7, you can set such description as default without specifying the version. Perl 5 retains the extreme backward compatibility of Perl 5, while Perl 7 achieves modern behavior with minimal backward compatibility impact.
Work on Perl 7 is currently underway, but he doesn't have to worry about half a year before the first release candidate comes up. The release target for Perl 7 is next year, during which some release candidates will appear. Perl 7 is mostly the same as version 5.32, with no major rewrites or new features, but some experimental features may be implemented. Note that Perl 5 will enter long-term maintenance mode and will be supported for up to 10 years, Foy said.
CPAN, which is a collection of Perl libraries and modules, has nearly 200,000 modules. The modules maintained on CPAN should work with Perl 7, and compatibility modes are provided for other cases. The Perl community ' perl5-porters ' tests new versions of almost all software on CPAN, and has a long history of tools for checking the impact of Perl changes on the community, Foy said. Foy is also the author of the module, and often gets a message from various people, such as Andreas Koenig and Slaven Rezić, who have long contributed to the CPAN community, that their modules may not work with the new Perl. I heard that I received it. Despite some modifications, Foy says the Perl 7 codebase is pretty much the same as Perl 5, so it shouldn't be too hard.
by Per Henrik Johansen
There could be a separate CPAN for Perl 7, but Perl 7 developers don't want to redo what's already working, and manage it with as little effort as possible. Mr. Foy should be. Also, PAUSE (Perl Authors Upload Server) has received a lot of love from the community over the last few years, making it easier to meet future needs, and people with experience and talent related to PAUSE Foy says it has made the codebase more manageable.
Perl developer Sawyer X divides Perl users into three categories: 'people who don't change code,' 'people who use new features,' and 'people who start from scratch,' and Perl 5's extreme backward compatibility. Although sex is surprisingly successful, it is only useful to those who do not update the code. The new features of Perl 7 address the long boilerplate that was written in the program and the beginner's question, 'Why should I include so much just to make a program?'
The features that are disabled in Perl 7 are: You can also enable these features.
・Indirect object notation
・File handle by bareword (excluding standard file handle)
・Pseudo multidimensional array and multidimensional hash
-Perl 4 style prototype declaration (alternative is ':prototype()')
New features enabled in Perl 7 include Postfix references, new isa operator, etc. By default, all features are enabled, including features in Perl 5.32. If you're using bareword filehandles or indirect object notations, you should do the conversion, but there is a compatibility mode to help with the messy code that can't do that, as well as the transition from Perl 5 to Perl 7. ..
Also, features that are disabled by default in Perl 7 can be disabled in version 5.32, so you can see if you can migrate to Perl 7 without problems.
Related Posts:
in Software, Posted by darkhorse_log