Dan Book (), supporting over 70 modules in CPAN, of the risks associated with the proposed It is worth noting that the Perl 7 branch plans to include the strict mode by default, activate use warnings, and change the values of several parameters that affect compatibility with old code.
This change is expected to render a large number of CPAN modules non-functional in Perl 7, requiring modifications to each such module, which is unrealistic to achieve within the planned year, especially since not all authors remain available. New features in Perl 7 will also prevent the use of modules designed to support versions prior to the latest version of Perl.
Additionally, the following possible issues are mentioned:
- Confusion for newcomers due to some examples and recommendations in guides written for Perl 5 being non-functional in Perl 7.
- The impact on the development of one-liners has not been explored. Perl is actively used not only for writing large scripts but also for creating one-liners and short scripts for administrative needs, where the use of strict mode is unnecessary.
- Distributions face the problem of simultaneously providing executable files to run both Perl 7 and Perl 5 scripts (a repeat of the history with Python 2 and 3 is expected).
- Code written for Perl 7 need not specifically indicate that it will not work in Perl 5, as many developers are unlikely to specify the minimum supported version.
- Various utilities and modules relying on Perl 5 will require fixes.
- The preparation of Perl 7 will temporarily freeze the development of new features for Perl due to the reallocation of resources.
- There is a risk of burnout and the departure of active developers of the Perl interpreter, modules, tools, and accompanying packages due to the emergence of a large additional workload without proper motivation (not everyone agrees on the necessity of creating Perl 7).
- The culture within the community and the attitude towards the stability of Perl will fundamentally change.
- The credibility of the language will be undermined due to criticism regarding the compatibility of Perl 7 with existing code in the absence of anything fundamentally new.
To mitigate the negative consequences, Dan Book proposed his plan, which will help avoid compatibility issues. He suggests maintaining the existing development process and assigning version 7.0.0 to the next release instead of 5.34.0, during which support for indirect object notation will be turned off and some new features, such as try/catch, will be included. Changes like 'use strict' and 'use warnings' should be regulated by explicitly specifying the Perl version in the code using the pragma 'use v7' (strict is already enabled by default for 'use v5.12' and later releases).
By default, the interpreter is recommended to retain a parameter set indistinguishable from Perl 5, except for the standard process of cleaning up outdated syntax used previously. Support for old features and deprecated syntax can still be discontinued according to the existing rules for transitioning functionality to deprecated status. It is suggested to signal the use of new Perl 7 elements in the code and to separate new and old styles using the pragma 'use v7'.
Source: opennet.ru
