Re: RE: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /pear DB.php/pear/DB common.phpmysql.php

From: Date: Tue, 05 Dec 2000 20:21:23 +0000
Subject: Re: RE: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /pear DB.php/pear/DB common.phpmysql.php
References: 1 2 3 4 5  Groups: php.pear 
Request: Send a blank email to php-pear+get-557@lists.php.net to get a copy of this message
On Tue, Dec 05, 2000 at 08:15:42AM +0100, Stig S. Bakken wrote: > > In the case of an if with no else clauses, and only a 1 line action, > > the curly braces may be omitted: > > > > if (condition) action; > > > > or: > > > > if (condition) > > action; > > I disagree with this one. I find always using braces helpful because it > makes it easier to add a new line, it makes debugging easier and it is > more consistent. I prefer to always use the braces, too, but you'll note that the rule above says the braces "may" be omitted. I can still read the code just fine without them, and some people prefer to omit them. I guess I really don't feel one way or another about this one, but I always add them when writing code to prevent help future logic errors. > May be worth mentioning that we don't ban C++ comments like the PHP > source does. In PHP it is banned because some compilers allow it for C > code, while others don't. Good point. > > Use "example.com" for all example URLs, per RFC 2606. > > Didn't know there actually was an RFC for that. Heh. Yeah, I forgot who pointed that out to us initially, but it feels good to be "standards compliant" wherever possible. =) -- Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member

« previous php.pear (#557) next »