Re: (PR#8992) Patch: Building ferries

"Benoit Hudson" <bh-0/DuvcfrMH9wGe/[email protected]>
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
<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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.