http://www.perlmonks.org?node_id=243130


in reply to Perl 6 is too complex

I had the same initial reaction as AnonyMonk when I read it. But, then I found this little Perl 6 gem of code (formatting slightly changed):

my @squares := apply { $_ * $_ } 2..5; multi apply(&func, *$head, *@tail) { return func($head), apply(&func <== @tail); }

That looked really nice to me. It was inherently perl-ish and elegant. As a mental exercise, I converted that Perl 6 code to Perl 5 best I could and came up with:

my @squares = apply(sub{$_[0] * $_[0]}, \(2..5)); sub apply { my($sub, $refArray) = @_; return map {$sub->($_)} @$refArray; }

As you can see, both pieces of code, version 5 and version 6, are remarkably similar. The Perl 6 version looks a little more tweaked... a little nicer... a little more elegant. Well... it looks like the appropriate evolution from Perl 5 to me.

After reading the Apocalypse, I wrote up a summary of all of (what I thought were) Larry's major points here. I just wanted to keep track of them, and others might find the summary useful.

enoch