Saturday, March 8, 2008

Quo Vadis Perl6?

Atlast, I found an opportunity to use the only Latin words that I know. Some of you might be aware that Perl6 has been in development for sometime. This article gives you a brief overview of Perl6 and some of its new features.

Why Perl6?

Perl is a unique language in the programming world. It is very powerful yet easy to learn and one of the few languages that can be used for system as well as application programming. But there is one little problem with Perl. Perl5, the latest major version of Perl is about to become 12 years old.

When Perl5 was released, it intended to compete with C. Even today, many would pick Perl over C for their programming needs. But, 12 years is an eternity in computers (in life too! Just think how your life was 12 years back) and though Perl5 embraced most of the modern day paradigms such as Object orientation, multi-threading and modular programming, everyone knows some of these features needed a serious rewrite. For example, the initial threading mechanism introduced in 5.005 was later replaced by a completely different implementation in Perl 5.6. Object orientation didn't provide any encapsulation mechanism and it is not really intuitive. Also, Perl5 needed a behavioral lesson for some of its built-in features.

Perl6 is in development for sometime and its goal is to eliminate many of the Perl5 drawbacks while retaining its simplicity and powerful features.

New features

There is an architectural change in Perl6 with the introduction of Perl Virtual Machine. In essence, the following are some of the important changes in Perl6.

  • Perl6 Virtual Machine with compiler support.
  • Cleaner syntax
  • Greater object orientation with encapsulation support.
  • Garbage collection services.
  • Backward compatibility with Perl5 using a Perl5 compatibility layer.

    Parrot Perl's new Virtual Machine

    One of the drawbacks of Perl5 is that it is not compile-able. Interpreted programs run slower and the source code has to be distributed to the customers. Though, there are tools available to get around this limitation, true compiler-support is not available in Perl5 and this has been one of the major road-blocks for big development projects.

    Perl6 overcomes this obstacle by providing virtual machine based compiler support similar to Java/.Net. Future Perl6 compilers will generate the output in a byte-code format for Parrot virtual machine. The Parrot VM, though developed as part of Perl6, is not specific to Perl6 and in future it might support other languages such as Ruby/Python, etc.

    Pugs A Perl6 implementation in development

    So, you can't wait for Perl6 to fully available? No problem. There is a Perl6 implementation called PUGS is available for those early parrots! You can download PUGS from CPAN site,

    More information

    You can check out Perl6 home page at More information for parrot is available at and information for PUGS is available at

    Do you find the Perl6 features compelling enough to move from Perl5? Do you have any concerns/questions about Perl6? Click on the link below to talk back.

  • No comments: