Subject: Re: CodingGuidelines Perl amendment

From: Ted Zlatanov <[email-masked]>
Date: Wed, 06 Feb 2013 13:54:47 -0500

On Wed, 6 Feb 2013 19:44:16 +0100 demerphq <[email-masked]> wrote: 

d> Ah ok. Right, at a low level:

d> if (condition) { do_this() }

d> is identical to

d> condition && do_this();

d> IOW, Perl allows logical operators to act as control flow statements.

d> I hope your document include something that says that using logical
d> operators as control flow statements should be used sparingly, and
d> generally should be restricted to low precedence operators and should
d> never involve more than one operator.

I'd stay away from wording it so tightly, but instead just say

"Make your code readable and sensible, and don't try to be clever."

But this is good C and shell advice too, so I'd put it under "General
Guidelines" and leave it for Junio to decide if it's appropriate.

Ted