develooper Front page | perl.perl5.porters | Postings from July 2013

Re: Using braces on 'if'; Was: Re: Asan help request

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
July 31, 2013 12:49
Subject:
Re: Using braces on 'if'; Was: Re: Asan help request
Message ID:
20130731124926.GA655@cancer.codesimply.com
* Father Chrysostomos <sprout@cpan.org> [2013-07-31T00:29:49]
> I would prefer that we not have too many rules.  Being able to format code
> free-style allows for more clarity when things can up vertically:
> 
>     if      (CvROOT(cv))  slab = OpSLAB(CvROOT(cv));
>     else if (CvSTART(cv)) slab = (OPSLAB *)CvSTART(cv);

Note that the policy that Karl mentioned was that braces were required when the
statement was not on the same line as the if.  What you show above is not
violating the policy as it would if you split it across four lines: if / stmt /
else / stmt

-- 
rjbs

Thread Previous | 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