All you need to know about Perl 6


Technology, Open Source, Perl...

The annual London Perl Workshop took place on Saturday, gracing us with the theme of a Perl Christmas. The event was dedicated to a special arrival underneath the Christmas tree this year: the arrival of Perl 6!

With that in mind, we asked experienced Perl Programmer and regular contributor at events such as YAPC, LPW, the Dutch Perl Workshop, and more, Steve Mynott, some questions on the introduction of Perl 6 and the key points you need to know about its release.

How is Perl 6 different from Perl 5?

Perl 6 is a different computer language to Perl 5 but a member of the same Perl family of languages sharing the same original author Larry Wall.  They are similar in many ways; both are large and complex languages with much syntax which leads to great expressive power as compared with other languages. Perl 6 features what its community believes is mostly cleaner and clearer syntax although some Perl 5 people might prefer what they already use.

Perl 5 is a lot more mature than Perl 6. Perl 5 has tens of thousands of library modules whereas Perl 6 will only have a few hundred by the end of 2015. Although Perl 6 has been talked about for a long time, useable versions still remain relatively new, however there will be a focus on improving Perl 6 performance throughout 2016.

The syntax of Perl 6 has had many changes compared with Perl 5 but it should be fairly easy for most programmers to convert since the underlying ideas are similar, although greatly extended in the newer language. Object Orientation is built into Perl 6 to a greater degree than Perl 5 and many core functions return objects rather than simple text.  Furthermore, Perl 6 features a greater use of typing although it’s mostly optional, whilst the way arguments are passed to subroutines is simpler and closer to other languages.

How will Perl 6 change Perl from a technical and social standpoint?

Perl 6 has already changed Perl 5 since Moose (loosely speaking) is Perl 6 objects backported to Perl 5.  It’s hoped this sort of cross fertilisation might continue to happen since it ends up benefiting both languages. Hopefully, some sort of Perl 5 version of Perl 6 grammars will happen.

Predicting the future is very hard (if not impossible) but the experience with the small Perl 6 community has been that many more people outside the existing wider Perl community have joined up. The Perl 6 community has been very friendly and welcoming to these people and puts great stress on treating people pleasantly.   An influx of new blood as a result of Perl 6 can only be good for the wider community.

It has always been the plan that Perl 6 will be able to run Perl 5, with two experimental projects already existing to help with that. The simple solution of directly linking the two languages “inline” works well already and the more complex “v5” solution of running Perl 5 inside Perl 6 has a lot of potential.

How will Perl 6 change the view of Perl?

Perl 6 changing the image of PerlI believe Perl 5 is (unjustly) seen by some outside the Perl community as rather cryptic, old fashioned and hard to learn.  Hopefully Perl 6 might prove more acceptable to such people.  It’s also more likely that the features of Perl 6 might attract academics and be taught in universities, which will further benefit all.

Running Perl 5 under Perl 6 under the Java VM (JVM) might be a route to running Perl 5 in enterprises which only allow JVM languages.

What do you find exciting about Perl 6?

Perl 6 is a fresh start and a reboot of Perl. The technological underpinnings (e.g. use of multiple virtual machines) are much better.  There can only really be one Perl 5 (and minor variations) whereas there can be many implementations of Perl 6 with compatibility assured via a large test suite.

The support for running many parts of a program at once (“parallelism”) and without waiting for a result straight away (“async”) across modern CPUs with many cores is better than any other similar language.

Going back to differences between Perl 5 and Perl 6, a great advance is the Perl 6 grammars which have significantly built on Perl 5’s regular expressions. Perl 6 also allows the use of sub-languages within itself and glues well with other languages with the support of C libraries being particularly easy.

From a personal standpoint, it’s particularly exciting to be involved in the development of a new computer language. Making this a lot easier has been the utilisation of GitHub, and, of course the support from the amazing community of Perl.

How will Perl 6 change Perl from a recruitment and job market standpoint?

This is difficult to say, with my suspicion that it probably won’t change much in the near future. However, I’d love to see an immediate flood of Perl 6 job openings despite the fact that most technical employers tend to lag well behind with new technologies.

My suspicion is that adoption in the medium term is more likely in smaller, more agile start-ups rather than large companies moving existing code bases to Perl 6. With this in mind, I believe Perl 6 may compete more against Ruby and Node.js than the existing Perl 5.

Steve has over a decade of experience in fast paced, technically demanding roles such as Team Leader and Senior Programmer (Perl, Java etc.) for independent software vendors, internet service providers, e-commerce and media companies, and is a well respected member of, and regular contributor to the Perl Community as well as events such as YAPC, LPW, and more.

If you’d like to discover more about Perl 6 please visit the website, alternatively if you’d like to discover more about getting involved in the Perl community or discuss your career in Perl, please don’t hesitate to get in touch with us, or come visit us at one of the regular Perl and Technology events we attend.

Click here for Perl Jobs