Monday, December 31, 2007

Perl Offers Incremental Update; Version 6.0 Still Awaited

The first new version in five years of Perl, the popular Web scripting language, is now available, according to spokesmen from the Perl Foundation. The release is available for a free download as open source code from Perl.org or the Perl archive network.

Release 5.10 contains additions and enhancements to the language rather than the total revamp represented by a new version, Perl 6.0, announced by Perl's original author, Larry Wall, in 2000.

Perl -- like Tcl, Python, JavaScript, and PHP -- is a "dynamic" language that is interpreted, or run through an interpreter for each use of the program, instead of compiled once in advance. For that reason, changes to a phrase or line of Perl get picked up immediately in the next use of a Perl program in a runtime environment. Perl is often used to tie together dissimilar elements of a Web site, such as pieces of Java and Visual Basic code and other site resources.

But Perl has developed spontaneously, adding features and function before an overall design was in place. Wall, on the Perl.org Web site, said, "Perl 5 was my rewrite of Perl. I want version 6 to be the community's rewrite of Perl."

On the same site, the internals of the version 5 interpreter are described as "so tangled that they hinder maintenance, thwart some new feature efforts, and scare off potential internals hackers. The language as of version 5 has some mis-features that are a hassle to ongoing maintenance of the interpreter and of programs written in Perl."

Release 5.10 of Perl is meant to incorporate some additions to the language in lieu of the emergence of version 6.0. The interpreter has been sped up and given a smaller footprint in memory. "State variables" allow variables in a program to persist between calls to subroutines, so they don't have to be named again at a later point in the program.

A "say" command has been added to govern text output tasks. A "switch" operator sends a program's logic in various directions, depending on the conditions encountered. Changes have been made to how text is handled by the "regular expression" approach, according to information posted on the Perl.org Web site.

Release 5.10 was produced by Rafael Garcia-Suarez, a French software engineer who lives in Paris and is employed by Booking.com. He is a longtime contributor to Perl.

Version 6.0 seeks to establish a neutral mode of operation for the interpreter, allowing it to deal with different scripting languages. Interpreters often run pre-compiled code or byte code that has been moved beyond source code into a language that is more readily interpreted to the hardware. The version 6.0 interpreter may be able to run the byte code of other scripting languages, such as Python or Ruby, as well as Perl.

Fully compiled code, such as C or C++, runs faster but interpreted code is constantly picking up small changes to a program and incorporating them into its operation at runtime. Web site developers often resort to scripting languages for that purpose and for their ability to adapt to different languages and data types.

No comments: