Re: Re: PHP Coding Standards

From: Date: Mon, 31 May 2004 09:45:37 +0000
Subject: Re: Re: PHP Coding Standards
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-187268@lists.php.net to get a copy of this message
"Travis Low" <travis@dawnstar.com> wrote in message news:40BAC210.5010905@dawnstar.com... > I have to say I like everything about the PEAR coding standards except for the > K&R bracing style. I much prefer: > > if( foo ) > { > blah; > } > > to > > if( foo ) { > blah; > } > > > The latter form (K&R) conserves vertical space, but I find it a lot harder to > follow. Harder to move blocks of code around too. I'm sure plenty of people > disagree, so of course this is IMHO. Hi Travis, I totally agree with you. I'm coding this way: if (foo) { // code } elseif (bar) { // code } else { // code } This makes it very easy to follow if/elseif/else structures in code. But the PEAR style is the one usually used in Java as well so I guess it's the style most people use. Regards, Torsten

« previous php.general (#187268) next »