[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]
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.
> 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.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
Barbie says, Take quaaludes in gin and go to a disco right away!
But Ken says, WOO-WOO!! No credit at ``Mr. Liquor''!!
|
|