The granddaddy of modern scripting languages is getting an extreme makeover. Perl, a
high-level programming language that was critical in the initial construction of the Internet, is undergoing major renovations from author Larry Wall with the help of the Perl development community.
The general release is about 18 months away. Although Wall still is designing Perl 6, there is a good sense of what it will include. One thing is certain: Perl 6 will look vastly different from its predecessor.
Letting Go
"Perl 6 is a complete rewrite of the internals of Perl and a revision of the Perl syntax," said Allison Randal, a member of the Perl 6 core developer team and president of The Perl Foundation. "On the syntax side, we wanted to re-examine the language from the ground up, clean up the inconsistencies and add a few new features," she said.
Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages, "no one pretends for a moment that they're anything but hideously ugly," said Damian Conway, a core Perl developer and associate professor at Monash University in Australia.
Perl expressions have evolved over many years to become larger and more complicated, Conway told NewsFactor. "Extra features [have had] to be shoehorned in and around the existing syntax," he said. Perl's regular expression syntax has grown "to the point where it no longer even fits in most people's heads," he added.
At the same time, Conway said, these regular expressions were not "powerful enough for many data-parsing tasks. Deciphering modern structured data formats -- like HTML, XML, PostScript or even just SQL -- really requires the ability to coordinate and nest sets of regular expressions." As a result, the Perl 6 development team scrapped the old syntax and started from scratch, coming up with a cleaner syntax and more powerful semantics, Conway said.
Additional features of Perl 6 include built-in grammars, a more sophisticated type system, powerful new control structures, a macro language and a smaller core footprint for running on PDAs.
Imitation Bird
Interoperability with other languages will be a hallmark of Perl 6. It will run on a new interpreter engine, Parrot, specifically designed to "support a wide range of languages and allow them to easily interchange data and share types and functions," Conway said.
Parrot provides a "software CPU" with register-based architecture instead of the more common stack-based virtual machine architecture. "That allows us to tap into several decades' worth of research in optimization of hardware-based register machines," Conway said. (continued...)
|