Re: cvs: php4 /ext/bcmath bcmath.c
| From: | Jon Parise | Date: | Thu, 03 Apr 2003 08:01:44 +0000 |
| Subject: | Re: cvs: php4 /ext/bcmath bcmath.c | ||
| References: | 1 2 3 4 5 6 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-20018@lists.php.net to get a copy of this message | ||
On Wed, Apr 02, 2003 at 11:48:55PM -0800, Rasmus Lerdorf wrote:
> Also, this is not noise IMO:
> >
> > > > > - if(bc_precision<0) bc_precision=0;
> > > > > +
> > > > > + if (bc_precision < 0) {
> > > > > + bc_precision = 0;
> > > > > + }
>
> Well, perhaps. I certainly agree that:
>
> if(bc_precision<0)
> bc_precision=0;
>
> is bad because it is easy for someone to get the wrong idea and add a
> second expression and think it would be covered by the condition. That
> argument is pretty weak for the single line case.
I would argue that adding the braces in the initial commit makes
things more consistent and reduces future diffs should an additional
statement be added.
Regardless, I think the ideal answer is for everyone to just follow
the same standard from the beginning. If we all did that, there would
be no reason for style- or whitespace-related commits.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)