Risk analysis for the implementation of the Perl 7 initiative

Dan Book (Dan Book) supporting more than 70 modules in CPAN, analyzed risks in the implementation of the proposed Perl 7 Implementation Plan. Recall that in the Perl 7 branch, they intend to enable the default strict mode "strict", activate "use warnings" and change the value of a number of parameters that affect compatibility with old code.

The change is expected to break a large number of CPAN modules in Perl 7 and require changes to every such module, which is unrealistic to implement in the target year, especially given that not all authors remain available. The changes in Perl 7 will also prevent the use of modules that are designed to support more than just the latest version of Perl.

In addition, the following possible problems are mentioned:

  • Newbie confusion due to Perl 7 not working with some of the examples and recommendations from the manuals written for Perl 5.
  • The impact on the development of one-liners has not been studied. Perl is actively used not only for writing large scripts, but also for creating one-liners and short scripts for the needs of administrators in which the use of strict mode is unnecessary.
  • Distributions have a problem with delivering executables for running Perl 7 and Perl 5 scripts at the same time (expected to repeat history with Python 2 and 3).
  • Code written for Perl 7 doesn't have to specifically state that it won't work in Perl 5, many developers won't specify a minimum supported version.
  • Various utilities and modules based on Perl 5 will require patching.
  • Preparing Perl 7, due to the reallocation of resources, will freeze the development of new Perl features for some time.
  • There is a risk of burning out and leaving the active developers of the Perl interpreter, modules, toolkits and package maintainers due to the large additional workload without proper motivation (not everyone agrees with the need to create Perl 7).
  • The culture in the community and the attitude towards the stability of Perl will fundamentally change.
  • The credibility of the language will be undermined by criticism that Perl 7 is not compatible with existing code in the absence of something fundamentally new.

To mitigate the negative consequences, Dan Book proposed his plan, which would avoid a compatibility gap. It is proposed to keep the previous development process and instead of 5.34.0 give the next release number 7.0.0, which disables support for indirect object call notation and includes some new features such as try/catch. Changes such as "use strict" and "use warnings" are proposed to be controlled by explicitly specifying the version of Perl in the code via the "use v7" pragma (strict is already enabled by default for "use v5.12" and newer releases).

By default, it is recommended that the interpreter retain a set of options that does not differ from Perl 5, with the exception of the regular process of cleaning up obsolete syntax, which was used before. Support for old features and deprecated syntax can continue to be deprecated in accordance with existing rules for deprecating functionality. Signaling the use of new Perl 7 elements in code and separating new and old styles is offered with the "use v7" pragma.

Source: opennet.ru

Add a comment