Originally posted on thenewstack.
There’s an old Monty Python bit I always want to reference when it comes to wonky version numbering, and Perl certainly offers no exception. This week saw the unveiling of Perl 7, which, they write, “is going to be Perl 5.32, mostly.”
As we’ve previously explored, the jump from Perl 5 to Perl 7 is because Perl 6 became such a completely different language than its predecessor that it decided to do just that, recently being renamed Raku and going off to live its own life, thank you very much. On this topic, the Perl 7 announcement says that “A long time ago, we thought that a very ambitious rewrite effort would replace v5.8. In short, that’s not what happened and the language has gone on to live a life of its own. So, 7 was the next available number. That’s it. It’s just the next cardinal number in line.” And in case you think it weird to simply move on to Perl 7, the team offers several examples of other weird version numbers, so that you might happily move on with your life and hopefully never speak of Perl 6 again.
Moving on, or going back as it were, Perl 7 is mostly just Perl 5.32, “but with different, saner, more modern defaults.” Essentially, Perl 7 adds a bunch of stuff as default that you would previously have had to declare, each and every time, at the beginning of your code. As for what’s happening to Perl 5, it’s going into long term maintenance mode, which means it likely has about a decade of support left.
What is new with Perl 7, then, other than defaults, you might wonder? The answer here, again is… not so much. While there are some things disappearing from Perl 5.32, they write that “again, this is essentially Perl 5.32 with the knobs and dials in different places.” New features, meanwhile, such as postfix dereferencing or the new isa operator, are available without you having to do anything. “That’s the benefit of the new social contract a major version provides. It’s a hard boundary where new features can exist by default on one side without disturbing the other side,” they write.