Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
Home

[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Tue, 23 Oct 2001 03:28:42 +0100

On Tue, 09 Oct 2001, rwetmore@xxxxxxxxxxxx wrote:

> I sometimes worry about absorbing too much German influence, but I
> actually like adding the "_checked" or "_unchecked" suffixes to 
> distinguish nearly identical macros/functions. I actually prefer to
> use "_unchecked" for the dangerous one, because most people are lazy
> enough in typing and if they find the short default, they don't do
> serious damage, just performance.

I think it is a bad idea to have to have two versions (one `safe' and
one `unsafe') of all/some functions that take positions as arguments.

That way, every time you change the logic in a function you have to
check whether or not you should from _checked to _unchecked or vice
versa.  Better to just use real, normalised coordinates everywhere.
As an added bonus, you have to consider what you wish to do in the
unreal case everywhere you use the functions (easy), rather than come
up with a default that suits all the uses of the function (hard).

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
UH-OH!!  I put on ``GREAT HEAD-ON TRAIN COLLISIONS of the 50's''
 by mistake!!!


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