Thread (1 message) 1 message, 1 author, 2016-06-15

Re: CodingGuidelines Perl amendment

From: Ted Zlatanov <hidden>
Date: 2016-06-15 22:56:04

On Wed, 6 Feb 2013 19:44:16 +0100 demerphq [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help