Exegesis 2: Damian Conway On Perl6
sumengen writes: "Damian's writing a series of articles parallel to Larry's Apocalypses.
These 'Exegesis' articles will show full perl6 programs, with
commentary exlaining the new features.
The first Exegesis (numbered 2, to keep in sync with Larry) shows a
perl6 version of a binary tree program from the Perl Cookbook.
Get excited to see things like:
my int ($pre, $in, $post) are constant = (0..2);"
my int ($pre, $in, $post) are constant = (0..2);"
Now in Perl 6, one can have such syntax as: my int ($pre, $in, $post) is constant = (0..2);
and: $ARGS is prompts("Search? ");
With the advent of this new "is" construction and the use of passive voice in the code, I think that the following should also be added:
This would allow for such conventions as:
$*ARGS be chomping;
"LibCGI.pl" is being required;
(or if one wants to be smart:)
recognize $foo!;
Just a thought.
There is a theory that if anyone ever discovers exactly what Perl is for and why it is here, it will immediately disappear and be replaced by something even more bizarrely inexplicable.
There is another theory which states that this has already happened...
There is yet a third theory which states that both the first two theories were concocted by a wily editor of the Camel Book in order to increase the universal level of uncertainty and paranoia, and so boost sales of the book.
siener's youtube channel
The real strength of Perl lay not in its technical construct, or its syntax, or even in the vast set of modules and libraries available to it. The truest strength of Perl is its culture. Larry Wall, from very early on, has tried to foster a real, positive community.
Perl6 is yet another cultural extension to Perl5. The RFC process was very messy, disorganized, and perhaps a little out-of-control. Indeed, as Larry said, he spent several months mentally thrashing as he tried to grok all of the RFC's. But that is the way he wanted it. The RFC process was a picture of a real-life war-room or think-tank.
The end result will be very exciting, I believe. The Perl6 documents, to date, have capitalized on cultural strengths of the Perl community.
Truly, Perl6 is built on the most important resource available to Larry: the huge diversity of Perl programmers all over the world. That diversity has made Perl5 a great, legendary language. I think it will make Perl6 even better. As Perl advocates, I think our best effort is in being inclusive, rather than exclusive, in our thinking.