perlmeditation
Ovid
<p>Damian Conway is busy rewriting code from the Perl Cookbook. He's writing it in Perl 6 to allow us to see how the migration will work. Check it out at [http://www.perl.com/pub/2001/05/08/exegesis2.html].
<p>
For the most part, the code looks familiar. Even newer constructs aren't terribly difficult to figure out:
<code>
my int ($pre, $in, $post) is constant = (0..2);
</code>
And something that I appreciate: named and typed parameters!
<code>
sub insert (HASH $tree is rw, int $val) {
...
}
</code>
Admittedly, I appreciate the versatility of variadic functions, but sometimes we get bitten. This is a nice feature.
<p>
There's lots more there to dig through. Looks like Perl 6 is going to be very interesting. Enjoy!
<P />
Cheers,<br />
<a href="/index.pl?node=Ovid&lastnode_id=1072">Ovid</a>
<P />
<FONT SIZE="1">Join the <A HREF="http://setiathome.ssl.berkeley.edu/stats/team/team_86606.html">Perlmonks Setiathome Group</A> or just click on the the link and check out our stats.</FONT>