Perl 7 will smoothly continue the development of Perl 5 without breaking backward compatibility.

The Perl Project Steering Committee summarized plans for the further development of the Perl 5 branch and the creation of the Perl 7 branch. During the discussions, the steering committee agreed that breaking compatibility with existing Perl 5 code is unacceptable, except in cases where incompatibility is necessary to address vulnerabilities. The committee also concluded that the language should evolve, and new features should be promoted more actively, simplifying access to emerging innovations and encouraging their adoption.

Contrary to the original intentions that allowed breaking changes to be enabled by default in the Perl 7 branch, the new plan implies a gradual transformation of the Perl 5 branch into Perl 7 without breaking backward compatibility with existing code. The release of Perl 7.0 will not conceptually differ from the next Perl 5.xx branch.

Development of new Perl 5 releases will continue in the same manner — new features added to the branch that are incompatible with old code will still only be included when explicitly specified in the code via the pragmas 'use version' or 'use feature feature'. For example, the 'say' keyword was introduced in Perl 5.010, but since existing code might use functions named 'say', support for the new keyword was included only when explicitly specified by the pragma 'use feature ‘say'.

The new syntax added to the language, which would have caused an error in previous releases, becomes available immediately without the need to specify special pragmas. For example, in Perl 5.36, a simplified syntax for processing multiple values in a list at once (‘foreach my ($key, $value) (%hash) {‘) will be available immediately, even in code without the pragma ‘use v5.36’.

In its current form in Perl 5.36, when using the pragma ‘use v5.36’, 13 backward-incompatible features (‘say’, ‘state’, ‘current_sub’, ‘fc’, ‘lexical_subs’, ‘signatures’, ‘isa’, ‘bareword_filehandles’, ‘bitwise’, ‘evalbytes’, ‘postderef_qq’, ‘unicode_eval’, and ‘unicode_strings’) are activated by default, the “use strict” and “use warnings” modes are enabled, and support for the deprecated indirect object notation (where a space is used instead of '->') and multi-dimensional arrays and hashes in Perl 4 style (‘$hash{1, 2}’) is disabled.

When enough changes accumulate, instead of another release of Perl 5.x, a version Perl 7.0 will be formed, which will serve as a snapshot of the state, but will remain fully backward compatible with Perl 5. To include breaking changes and settings, explicit addition of the pragma "use v7" in the code will be required. That is, code with the pragma "use v7" can be interpreted as "modern Perl", where breaking changes to the language are available, while without it — "conservative Perl", which will remain fully backward compatible with previous releases.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster