Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: K&R style (was Re: [PATCH] slight optimisation ...)
Home

[Freeciv-Dev] Re: K&R style (was Re: [PATCH] slight optimisation ...)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Cc: Trent Piepho <xyzzy@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: K&R style (was Re: [PATCH] slight optimisation ...)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 09:07:01 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Aug 19, 2001 at 10:16:46PM -0700, Kevin Brown wrote:
> Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote:
> > On Sun, 19 Aug 2001, Kevin Brown wrote:
> > > > You want to go thought every single line of code making sure that indent
> > > > actually made it look nicer than what was there before?
> > > 
> > > No.  Instead, we apply indent, and then whoever *actually cares about
> > > it* can submit patches to fix the formatting.  What will actually
> > > happen is that people will submit such patches as they notice areas
> > > where the formatting is screwed up.
> > 
> > So you want to mess up the formatting and then have other people go in piece
> > by piece and fix it up again?  Sounds like a lot of unnecessary
> > work.  

Indeed Kevin's sounds like a selfish way for the initial indenter.

> It's no more work than what we have right now, which is to have the
> patch submitters format their patches prior to submission.  The only
> difference is who does the work and when it gets done.
> 
> If there's a comment or table in the code that gets messed up, but
> which nobody reads, then my proposal will result in no effort being
> expended to clean it up.  Simple, effective, and relatively
> economical.
> 
> And besides, just how much code/comments can there be that would be
> affected by this anyway???

Nobody knows.

> > > > Back in 1998 we decided against this, and CVS had just been started
> > > > up and there was a lot less code.  It would be an even worse idea
> > > > now.  It's not like not having the exact same indention style is
> > > > some kind of huge problem.  If half the code had 8 space indents and
> > > > half had 2 spaces, or half was K&R braces and half had that
> > > > butt-ugly GNU stair-step style then maybe it would be worth it.
> > > 
> > > This is not at all evident by the amount of discussion about
> > > formatting on the list and the current insistence that patches be
> > > properly formatted.
> > 
> > I'm not the one who's all anal about patch formatting be just the
> > exact way they want.  
> 
> Oh, believe me, I'm with you on this one.  As far as I'm concerned,
> the formatting of the code is pretty much irrelevant.  If I have to
> work with it, I may change the bit I modify to suit my tastes and
> that'll be reflected in my patches, but it's one of those things that
> people just shouldn't have to worry about.

I agree.

> And that's really my point in all this.  If the CVS maintainers are so
> concerned about the formatting of patches, then they can format the
> patches themselves, or format the code that's affected by the patches
> once they've applied them, or whatever.  But they shouldn't be
> foisting that work onto the patch submitters, because there's no
> point.
> 
> Frankly, I don't care if the code gets nicely formatted or not.  What
> I'm proposing is a method to deal with this issue once and for all.
> It has some drawbacks, but those drawbacks affect only those who
> really care about the formatting to begin with, so what's the problem?
> 
> But as long as this issue *doesn't* get dealt with once and for all,
> then we'll have people bitching about the formatting of someone's
> patch, and, on occasion, patch rejections based on formatting and not
> content.  And that's *insane*!

I haven't hearded of a complete rejection based on formatting.

> > There reason there is so much discussion is because formatting is
> > one of those holy war things that no one will ever agree on.  It's
> > also an easy thing to bitch about, because you can just look at some
> > code and tell you don't like the formatting without thinking about
> > it much.
> >
> > I'd also like to point out that not one other opensource project has
> > a system of running indent automatically on every commit.  I think
> > you're just worrying too much about something that isn't a problem.
> > The system we came up with back in the beginning of 1998 when CVS
> > was setup and freeciv only had 3 stars on linuxberg has worked just
> > fine for a long time.
> 
> So you *agree* with making the patch submitters format their code to
> certain standards, instead of having those who care (the CVS
> maintainers) do it?  That's how it's done now, after all, and you say
> it "works just fine".  I'm a bit confused about your stance on this...
> 
> I'd say that if patches are being rejected based on their formatting,
> then the system *doesn't* "work just fine".  We want and need people
> to contribute to the project.  We want them to deal with real issues,
> not trivia like formatting.  The more time they deal with nonsense,
> the less time they'll spend on the things that count.

This whole indent story looks like a FAQ entry. The question is still:
what do the other maintainers think about it? Can we do this big step?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Your mail could not be delivered to the following Address:
  VTCMC.VTLPR@xxxxxxxxxxxxx        ** Unassigned error message **"


[Prev in Thread] Current Thread [Next in Thread]