On 21 Jan 2002, Randal L. Schwartz wrote:

> >>>>> "Piers" == Piers Cawley <[EMAIL PROTECTED]> writes:
> 
> Piers> But, but, that should be 
> 
> Piers>     $foo && do_foo_stuff() || do_other_stuff();
> 
> And just to make sure my objections are noted in every thread
> you say this:
> 
>         DON'T DO THAT.
> 
> Any more than you'd use JAPH or Golf code in production.  Bad match.
 
What if you hypothetically wanted the 'broken' behavior? I can't think of
an example, but it seems like it could work as a terse version of:

    if $foo {
       do_foo_stuff() || do_other_stuff();
    } else { 
       do_other_stuff();
    }

...or something like that. 

Granted, the one line version doesn't make obvious how things are going to
flow, but assuming that you want things to flow that way, and you comment
it properly, could it be acceptable?

The fact that I feel obligated to say "and you comment it properly" is
probably a flag that it's not clear enough without explanation, and thus
can't be defended. Hrm...



-- 
Chris Devers

"People with machines that think, will in times of crisis, 
make up stuff and attribute it to me" - "Nikla-nostra-debo"


Reply via email to