[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]
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
|
|