So, for the last few months, I've been playing with Perl 6. I know, it's not ready for production use yet, and probably won't be for a while, but it's still fun to play with. This article isn't really an introduction to Perl 6, nor an in depth review. It's more of my feelings about it so far, and why I think Perl 6 rocks.

Check out the Wikipedia article on Perl 6 for more general information on the language.

As some people might now, most of my software is written in Perl 5, using my own Perlite libraries. I'm familiar with Perl, and consider it my preferred dynamic programming language.

I know, right now, the big thing is Python. And you know, I like Python. It's very clean, and is almost like writing psuedo-code and having it compile. I do use Python for some things, and at work have had to do a lot of work with Jython (which is Python implemented in Java.) However, that said, while I do like Python, I find it less flexible than Perl. That's not a bad thing for most people, but I'm one of the people who thinks "There's More than One Way to Do It" is a Good Thing.

Or is the next big thing Ruby? I know Ruby on Rails was the biggest catch phrase in web development for a while. Not really my thing though. I don't really like how most of those web framework things work. Webtoo Websight can be used as a traditional CGI application, a FastCGI application, or a mod_perl application. It's simple, and doesn't need to have it's own web server running in the background. I never did get the reasoning behind that.

To me, the next really big thing is Perl 6. With a new Object Oriented class framework including first-class Classes and dynamic Roles, a Rules/Grammar system replacing the existing Perl 5 Regular Expression engine, Junctions, formal Parameter lists (including proper named parameters!), Multiple Dispatch, Chained comparisons, lazy evaluation, simplified IO (file handle objects kick ass), and the best part (even if it's not implemented in Rakudo Perl yet): The entire grammar of the language itself is redefinable in Perl 6 (kinda makes those Source Filters from Perl 5 seem a bit lame, doesn't it.)

I've been playing with the new system, and so far, I really like it. It simplifies things where they should be simpler, while still allowing the advanced stuff to be done for those who want it.

For those who like static typing, it has that as well. Some syntax has changed significantly, but mostly for the better. I know some will argue over the changes to sigil semantics, but it doesn't bother me much. In the last year I've written programs or scripts in Perl 5, Perl 6, Bourne Shell Script (with and without Bash extensions), Python, Jython, Java, C#, Visual Basic and VB.NET. I don't think having to adjust to different syntaxes causes me any confusion.

In 2007, I was playing with Pugs, which was an implementation of Perl 6 written in Haskell. It was quite complete. Since then however, it seems to have been mostly abandoned, and won't compile from subversion on Ubuntu 8.04 or 8.10. However, Rakudo, which is the implementation of Perl 6 on the Parrot VM (a virtual machine for dynamic languages), seems to be developing very quickly now. With Parrot 1.0 scheduled for release in March of this year, it will be interesting to see if Perl 6.0.0 makes it out the door by Christmas 2009.

So far, I've been quite enjoying writing stuff in Perl 6. It's not very fast yet, and may take a while to catch up to the speed of Perl 5, and so far Rakudo is missing the ability to use Perl 5 modules in Perl 6 programs, which is a nice feature that Pugs and v6.pm both support. Still, it's coming along.

Now, in this day and age, every second blog seems to be declaring that Perl is dead, and that you should move to Python or Ruby, so as to not go down with the ship. Well, I'm still using Perl 5 for most of the programs that I write, and look forward to a point when Perl 6 is stable enough to use. No other language has such integration with an advanced Regular Expression system (and the Perl 6 Rules/Grammars, are even more impressive than those of Perl 5) which is one of the features that I would find it hard to live without.

I think that Perl has a bright future, and that it exists in the form of Perl 6, despite what the critics think. I think it will co-exist with Python, Ruby and the others, and via Parrot, will even be able to work together with them in a single application.

Now, that said, when it comes time to teach Gareth his first programming language, I'm starting with Python (2.x series, as the changes to 3.0 make it less friendly for beginners. I'm sorry, but print "hello world" is a lot easier than print("hello world")), before moving into Perl 6 (and eventually, other languages such as Java.) I will probably be using Perl 6 to write the majority of my software by that point, but I think Python has become the BASIC of the modern age, in that it's the best language to learn when starting out. Then again, I could always start with BASIC. I might just do that, it's what I started with after all. :-) Of course, maybe by that time, there will be a major implementation of Python on Parrot (of course, it will probably be based on Python 3.x, so maybe I'd better get used to that damn print() syntax) and you'll be able to write a module in Python, and use it in Perl 6, or vice versa. That will kick some serious ass.

I can dream can't I?

Changelog

Jan 14, 2009
Last update prior to importation to GreyNoise.
Jan 14, 2009
Initial version.