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

Re: Nested statement modifiers.

Thread Previous | Thread Next
From:
Paul Seamons
Date:
October 4, 2006 07:23
Subject:
Re: Nested statement modifiers.
Message ID:
200610040822.12215.mail@seamons.com
> It may be more useful to discuss this issue using less contrived
> examples. :)

I would agree.  I haven't had any use for a double "if" or a double "for".

The double "if" case is handled by "&&".  The double "for" case is handled 
by "for" and "map".

The interesting cases are combinations of "if" and "for" and "while" 
and "unless".

.say if cond($_) for =<>;

That one is sort of not necessary now that grep can be lazy.

.say for =<> if $read_the_rest;

Which can obviously be written in other ways using other constructs, but not 
without changing how the statement reads or changing what it emphasizes.

And as for Perl6 - well yes I'd love to see it get here more quickly also.  
But I don't think that discussing little nitpicks like this are delaying the 
release of Perl6.  Maybe they are - but I would guess there are more pressing 
issues that are occupying development time.

Paul

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