Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming
Home

[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Sep 2001 19:31:12 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Sep 02, 2001 at 06:48:22PM +0200, Gaute B Strokkenes wrote:
> On Sat, 01 Sep 2001, jshort@xxxxxxxxxxxxx wrote:
> > Gaute B Strokkenes wrote:
> >> 
> >> On Thu, 30 Aug 2001, gs234@xxxxxxxxx wrote:
> >> 
> >> > When I get back from work I intend to change is_real_tile()
> >> > IS_VALID_POS(), on the grounds that it tests a coordinate pair
> >> > rather than a tile pointer, and because a position if valid iff
> >> > it refers to a tile on the map.  I will change
> >> > normalize_map_pos() to always adjust the x coordinate, and then I
> >> > will add a IS_SANE_POS() to test whether a position refers to a
> >> > tile on the map and is in canonical form.
> >> 
> >> And here it is.
> > 
> > The naming varieties here are really getting out of hand.
> > 
> > First of all, I think we all agree on using "map_pos" instead of
> > "tile".  Perhaps "POS" would work instead, but why introduce it?
> 
> You seem to have been hypnotized by the recent discussion on the
> topic.
> 
> I'm not introducing it.  The code is full of functions that end in
> _pos without _map in front of it; normalize_map_pos() is the anomaly.
> It would make more sense to change normalize_map_pos to normalize_pos,
> though personally it doesn't bother me too much.

The code contains bad things. We all agree on this. However we
shouldn't continue to use bad stuff. Hopefully we can clean this and
similar things up in the long term.

> > You also use the "tile" naming immediately after you explained the
> > other day why it was wrong (and I agree with you).
> 
> The "#define is_real_tile" is just there so you don't have to read
> lots of stuff like
> 
> - if (is_real_tile(x, y))
> + if (IS_VALID_POS(x, y))
>     frobnicate(x, y);
> 
> > You use VALID to mean the same thing as real, use SANE to mean the
> > same thing as normal/proper,
> 
> What does "normal" mean, anyway?  Arguably a tile on the border of the
> map, with only 5 neighbours is not "normal".  If the discussions have
> taught us anything at all it is that "normal" or "normalized" is not a
> good choice of words.  I've been told that "proper" is too
> mathematical, so I thought "sane" would be a good compromise.
> 
> Can we stop debating this to death now?  Pretty please?  With sugar on
> top?
> 
> [The occurence of PROP in the patch was just a mistake on my part, it
> should have been SANE].
> 
> > then use real to mean the same thing as normal/proper (in
> > nearest_real_tile).
> 
> I had a metaphor like "update position to point to the nearest real
> tile" in mind.  Perhaps it should be nearest_tile(), as in "update
> position to point to the nearest tile" instead.  Or
> nearest_valid_pos().  I don't care that much.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)


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