Audrey Tang on Perl 6, pugs, and more

Perl 6 is the mythical creature that will allow Perl programmers to use a nice object orientation system, sane named arguments, better meta-programming (macros!), lazy lists, and lots of other cleanups of the syntax and common idioms. Interestingly, it also adds the option of strong typing with argument constraints built right in (my only experience with this kind of thing in the past has been a passing acquaintance with traits in Python, but I know enough to know it’s nice). I’ve read the Apocalypses approximately 100 years ago, and so I imagine I must have known all of these things were coming, but forgot all about it. But, watching Audrey’s video at the YAPC:Asia conference (warning, slides are in Japanese…I’m sure I missed a few good bits, but the code shown is in perl, the universal language, so the gist is clear no matter your native tongue) has gotten me really excited about Perl 6 again. It’s actually going to be released within my lifetime (probably), and possibly as soon as Christmas of this year. And that’s not even the most interesting thing about this video!

Watch the video at Google Video

What’s most interesting about this video is that pugs may be the most important thing to come out of the Perl 6 process (rather than a temporary mechanism for writing Perl 6 test cases while parrot develops). If you work in pugs, you can use Perl 6, Perl 5, Haskell, and all of the libraries that those languages have available without thinking much about it. You can also call out to Java seamlessly, but who gives a crap about that? (I guess the libraries in Java give it some value, and if you can use them from a good language all the better.) This seems to be a core feature in Perl 6, so I guess the Parrot version of Perl 6 will have the capability, too. Since I embody one of Larry’s three virtues (laziness), I like this. Of course, I’m also fascinated by functional programming, and have been reading MJD’s Higher Order Perl, and so the seamless integration of Haskell and Perl sounds very tasty to me.

One last thing I didn’t know about: Moose. Perl 6 style objects in Perl 5. This is nice. I don’t like Perl 5 objects, and really enjoy Ruby objects…this bridges that gap. I might actually use object orientated programming in my projects, now. Maybe.