Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2004:
[freeciv-ai] Re: (PR#8992) Patch: Building ferries
Home

[freeciv-ai] Re: (PR#8992) Patch: Building ferries

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#8992) Patch: Building ferries
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Oct 2004 09:22:54 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8992 >

On Sat, Oct 30, 2004 at 07:04:55AM -0700, Per I. Mathisen wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8992 >
> 
> On Sat, 30 Oct 2004, Benedict Adamson wrote:
> > > Why use braces around code that does not need it?
> >
> > I like doing that to emphasise that a code is a single section. If it's
> > incompatible with the consensus style for Freeciv, I'll change it.
> 
> I don't think we have discussed it, but no other code does it this way.

The typical reason not to is that if your code is getting complicated
enough to need this, then you should refactor it into several functions.

For an inner-loop function there are performance issues to worry about,
but otherwise, small functions (<1 page) tend to be easier to deal with.

        -- Benoît




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