Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?

by afoken (Chancellor)
on Oct 19, 2019 at 16:11 UTC ( [id://11107704]=note: print w/replies, xml ) Need Help??


in reply to Re: If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?
in thread If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?

The next version of Perl will indeed be version 32.

$ perl -v | grep '^This is' This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-li +nux-thread-multi

So going from Perl 5 to Perl 7 wouldn't be a "major version change", it would be a language name change.

If that was the case, I would expect to find something like this in the perl sources:

printf( "This is perl 5, version %d, subversion %d (v5.%d.%d), built for % +s\n", perlmajor, perlminor, perlmajor, perlminor, perlarch );

Searching for "This is perl" returns only a single C source file, with only one matching line: perl.c, currently around line 3768:

PerlIO_printf(PIO_stdout, "\nThis is perl " STRINGIFY(PERL_REVISION) ", version " STRINGIFY(PERL_VERSION) ", subversion " STRINGIFY(PERL_SUBVERSION) " (%" SVf ") built for " ARCHNAME, SVfARG(level +) );

Getting a git blame on that line shows that the last change was ded326e4b6fad7e2479796691d0c27b89d2fe080 in 2009, for v5.11, changing the format. The diff shows how the version was previously:

PerlIO_printf(PerlIO_stdout(), "\nThis is perl, %"SVf " built for " ARCHNAME, level);

So at least until 2009, the "5" in perl 5 was still part of the interpreter version number, and not part of the language name, at least technically. The commit comment explains the change:

The rationale for this change is that the Perl 5 interpreter will never increment PERL_REVISION from 5 to 6, so we want people to start focusing on the PERL_VERSION number as most significant and PERL_SUBVERSION as equivalent to a "release number". In other words, "perl 5" is a language, this is the 11th version of it, and the second release of that version (counting from zero). Among other things, this makes the output of -v and -V more consistent.

Unfortunately, the "blame" link on that page results in a broken document due to a server error while rendering the document:

500 - Internal Server Error Malformed UTF-8 character (fatal) at /var/www/git/gitweb.cgi line 1601 +, <$fd> line 107.

(This is visible only in the source view, Firefox complains about invalid XML.)

So I simply looked in perl 5.000, at perl.c. Line 966 writes out the version:

printf("\nThis is perl, version %s\n\n",patchlevel);

Here, the name of the language was clearly "perl", not "perl 5", and the interpreter version number started with "5". So, at some point in time between 1994 and 2009, the marketing of perl changed.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^2: If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?
by ikegami (Patriarch) on Oct 21, 2019 at 17:18 UTC

    Yes, of course "5" used to be part of the version. See perlhist. The change in convention was surely brought upon by Perl 6.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11107704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-24 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found