Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
Home

[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, Raahul Kumar <raahul_da_man@xxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
From: Jules Bean <jules@xxxxxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 17:50:34 +0000

On Wed, Dec 05, 2001 at 11:39:11AM -0500, Andrew Sutton wrote:
> On Wednesday 05 December 2001 11:18 am, Raimar Falke wrote:
> 
> >  <some number>
> >  This isn't about initialization!
> >
> > /* A */
> >   x = punit->x, y = punit->y;
> >
> > /* B */
> >   x = punit->x;
> >   y = punit->y;
> 
> you're kidding, right? somebody would actually use A? it's not very readable 
> and actually has a semantic meaning other than just doing a couple of things 
> in one line.

Not in this case, they don't.  They have the same semantics.  (Yes,
comma occasionally has different semantics from semicolon, but this
isn't one of those cases)

> my vote is for B. i prefer readability over concise code - when they do the 
> same thing.

Recall that you *have* to use the comma in for() anyhow, so it's not
that unreadable or inconsistent.

Jules



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