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.
For the most part, the code looks familiar. Even newer constructs aren't terribly difficult to figure out:
my int ($pre, $in, $post) is constant = (0..2);
And something that I appreciate: named and typed parameters!
sub insert (HASH $tree is rw, int $val) {
...
}
Admittedly, I appreciate the versatility of variadic functions, but sometimes we get bitten. This is a nice feature.
There's lots more there to dig through. Looks like Perl 6 is going to be very interesting. Enjoy!
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.