The View of Perl6 and Cleaning the Specs

After a bit of a discussion, starting with a comment about someday being able to use #!/usr/bin/perl to safely invoke Perl6 (that starts here), I decided to write this post (I chimed in at this point). Quick summary, the discussion was around how a Perl 6 interpreter is meant to parse the code given to it as Perl 5 code by default, unless and until told otherwise, as currently specced in S01. (Don’t worry, it’s a future-proofed link; shows S01 as it was in 31 Dec 2009, the latest as of 28 Dec 2010 07:38 UTC.) Check bullet 8 under “Random Thoughts”. My verdict is that the default should be exterminated, and here’s why:

As far as I can tell by browsing through the revision history (even the SVN history that goes back to 2005, which you can find in the logs ^^^!), that particular bit hasn’t been touched since, I must assume, its initial creation, in 2004. Back then, Pugs ruled the land, and Perl 6’s relationship to the rest of the Perl history was viewed very differently. Here are a couple of graphics to show you! The first one demonstrates how it was in the eras of Pugs and pre-Pugs.

This second one shows the view of Perl 6 with the rest of Perl during the days of Rakudo, after Pugs.

What do these two pictures show? (Keep in mind these graphics were created purely based on what I’ve read, and most likely have made huge generalizations. If I made a boo-boo, tell me at #perl6.) The first one shows how Perl 6 used to be viewed. It used to be viewed as the successor to Perl 5 (heck, perl6.org used to say as much on the front page), much like how Perl 5 was the successor to Perl 4, and so on. It was at this time S01 was put to Unicode-encoded information*. However, as the second graphic shows, nowadays Perl 6 is viewed as the offshoot of Perl (perl6.org now says Perl 6 is “the spunky little sister of Perl 5.”), with Perl 5 continuing development in parallel. What does this mean?

Now, Perl 6 is considered its own language, something that is Perl, and yet isn’t. Nowadays, it would be unwise (in my opinion), for a Perl 6 interpreter to install itself as an executable named `perl’. Way back in the days of the first graphic, however, because it was seen to be the successor, it would naturally install as `perl’, and need that Perl 5 by default feature to not break things. Since now Perl 6 interpreters are either named perl6 (as in the case of Rakudo) or the name of the interpreter itself (pugs, niecza, etc.), this provision no longer makes sense. I would daresay that even being able to use v5; for certain blocks (as demonstrated in S01) is useless as well.

To conclude, the history of Perl 6 and its relationship with Perl 5 is a complex one, almost deserving its own one hour special on the History Channel. Back in 2000, Perl 5 was in a slump, and Perl 6 was almost certainly going to be the heir to the throne, and therefore these provisions made complete sense, and indeed, it would have been insane to not include them. However, Perl 5 is active once more, it’s obvious Perl 6 won’t be stealing the crown any time soon (if ever), and these items no longer apply. I guess my message is this:

If you want to use Perl 5, use Perl 5. If you want to use Perl 6, use Perl 6.

S22 (future-proof!, show as it was 18 September 2009, the latest as of 28 December 2010 07:38 UTC) suffers from the same sort of outdatedness issues as S01; CPAN6 is dead. I wonder how much of the spec could use cleaning to better reflect the state and views of Perl 6 now?

*The electronic equivalent of the phrase “put to paper”.

Advertisements
This entry was posted in Think Tank and tagged , , , , , , . Bookmark the permalink.

One Response to The View of Perl6 and Cleaning the Specs

  1. Pingback: Thoughts on Module Distribution in P6 | Rakudo Death Star

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s