Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Perl 6 and Ruby on Railsby rg0now (Chaplain) |
on Apr 05, 2005 at 13:23 UTC ( [id://444976]=note: print w/replies, xml ) | Need Help?? |
Here is my strike at "Passing code blocks around as macros":
I think you could do that without the macro-magic with simple subs like This is because (from S4): Every block is a closure. (That is, in the abstract, they're all anonymous subroutines that take a snapshot of their lexical scope.) How any block is invoked and how its results are used is a matter of context, but closures all work the same on the inside. Digging around the Perl 6 specs, I begin to see that perhaps S4 holds some of the nicest things in the design of Perl 6. And, quite frankly, the more I read the more I feel how much I miss a working Perl 6 compiler... Update: hey, we can, with a slightly more convoluted syntax, do this with Perl 5 too: Then, what's the great deal? rg0now
In Section
Meditations
|
|