Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c
Home

[Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Cc: Markus Linnala <maage@xxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Thu, 16 Aug 2001 23:01:30 +0200

On Wed, 15 Aug 2001, xyzzy@xxxxxxxxxxxxx wrote:
> On Thu, 16 Aug 2001, Gaute B Strokkenes wrote:
>> This needs more spaces.  Also, the && should be at the beginning of
>> the line, not the end.
> 
> Other people (like me) like && at the end better,

I believe at the beginning is the K&R way.  Someone may wish to check.

Personally I think that putting a binary operator at the end of a line
is one of the most annoying and unreadable constructs that there are.
Perhaps this is partly because I'm a mathematician; I can promise you
that leaving a binary operator at the end of a line will make any
mathematician worth his or her salt go nuts.

On a pragmatical level, I like being able to quickly scan through an
if-statement and see what the conditionals are and how they are
related.  That's a lot easier if the logical operators are right at
the beginning rather than all the way to the right of the screen.

> and it's more common that way in the code.

I'm not so sure about that.  I think it depends on how old that part
of the code is.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
If our behavior is strict, we do not need fun!


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