[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r14478 - in trunk/subversion: tests/libsvn_subr

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-04-28 21:55:54 CEST

Greg Hudson <ghudson@MIT.EDU> writes:

> I don't think it's consistent with our code base to have multi-line (but
> single-statement) for loop bodies without braces. Every rule of style
> can seem like a "stupid rule" to someone who either isn't used to it or
> temperamentally doesn't benefit from it, but consistency is more
> important than making every developer happy.

I've written code for years to many different "coding standards", some
of which were laughable, and I agree that consistency is important;
consistency is probably more important than which standard is chose.
However think standards should try to avoid "foolish consistency" and
any standard that requires

  for(j = 0; path[j]; ++j)
    if (path[j] == ':' || path[j] == '/')
       break;

to be written as

  for(j = 0; path[j]; ++j)
    {
       if (path[j] == ':' || path[j] == '/')
         break;
    }

is foolish in my view, in the same way that I would object if required
to write

       if ((path[j] == ':') || (path[j] == '/'))

> (And yes, in retrospect I
> think we should have been consistent about space-before-paren for
> function calls across the entire source code base, even if I'm one of
> the dissenters on that front.)

I'd also like us to choose one or the other, I don't care which.

> That said, I don't think there's any specific rule about this in HACKING
> or in the GNU C standards.

The file in question contains other instances of code formatted in the
style I used.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 28 22:39:04 2005

This is an archived mail posted to the Subversion Dev mailing list.