in reply to Conditional style (if, &&) query
Not the most complex logic in the world, but IMHO you've already lost a lot of readability. As for the other two, I like the b() if expr; when there's only one expression to do, and the traditional if block any other time. Also, I personally find Stroustoup-style indenting/bracketing the most readable, ie.--$option > ($i - 1) && $a = shift;
I'm aware that this bracketing isn't the convention in Perl (if anything is a convention; TMTOWTDI), but it's my personal preference. What do others think?if ( expr ) { b() ; }
|
|---|