develooper Front page | perl.perl6.language | Postings from October 2006

Re: Nested statement modifiers.

Thread Previous | Thread Next
From:
Audrey Tang
Date:
October 3, 2006 18:31
Subject:
Re: Nested statement modifiers.
Message ID:
A5F897B2-DEB3-4666-B3A0-E86ECC7273EE@audreyt.org

在 Oct 4, 2006 7:46 AM 時,Damian Conway 寫到:

> [Apologies for the last post. Gmail got a little eager.
>  Here's what I meant to send...]
>
> Juerd wrote:
>
>> Which can also be written as:
>>
>>     do { do { say 1 if 1 } if 1 } if 1;
>
> Sorry, no it can't. From S4
> (http://dev.perl.org/perl6/doc/design/syn/ 
> S04.html#The_repeat_statement):
>
>     "Unlike in Perl 5, applying a statement modifier to a do block is
>      specifically disallowed..."

However, I wonder if this is too strict.  Disallowing "while" and  
"until" after a do block
is fine (and can be coded directly in those two statement modifier  
macros), but is there a
reason to disallow other modifiers?

Thanks,
Audrey


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About