Actually, one of the major disappointments I have with Perl6 is the continued distinction between subs and blocks. Personally, I think that blocks should be first class entities in their own right.

If you assigned a block to a variable, it would become a named subroutine.

my $sub = { ## do stuff }; my $result = $sub();

if, [while, for etc. would be methods called on the block:

{ #do stuff }.if( cond ); .if( cond ) { ## indirect object form ## do stuff } .while( cond ) { ## do stuff } .for $a -> ( 0 .. 10 ) { ##do stuff }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

In reply to Re^7: Perl can do it, take 1 (sentence generation) by BrowserUk
in thread Perl can do it, take 1 (sentence generation) by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":