develooper Front page | perl.perl5.porters | Postings from February 2009

flow control short-cut or postfix operator? (HIC JACENT COJONES)

Thread Next
From:
David Nicol
Date:
February 24, 2009 06:52
Subject:
flow control short-cut or postfix operator? (HIC JACENT COJONES)
Message ID:
934f64a20902240644y674877a2hfe1ca29d1bec2e7b@mail.gmail.com
On Mon, Feb 23, 2009 at 11:54 PM, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
> For PerlĀ 6 Larry has reneged on his position so far as to allow
> exactly one statement modifier conditional to be stacked with
> exactly one statement modifier loop (in either order, I believe).
> I am of the opinion that this would befit PerlĀ 5 equally, while
> I agree that to allow stacking in other forms would be unsound
> design.

Allowed:

    $a and $b and $c and dosomething;

Not allowed:

    dosomething if $c if $b if $a;

seems biased.

Of course, the second could  be written

    dosomething if ($a and $b and $c);

but that is not as easy to edit to, when you're adding yet another condition.

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