Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#3450) square_iterate and unreal positions

[Freeciv-Dev] Re: (PR#3450) square_iterate and unreal positions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3450) square_iterate and unreal positions
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Wed, 26 Feb 2003 20:55:12 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Raimar Falke wrote:
> On Tue, Feb 25, 2003 at 05:39:08AM -0800, Jason Short wrote:
>>Raimar Falke wrote:
>>>What outputs will square_iterate generate if you pass a non-real
>>>position in? It depends on the map position you passed in. 

That's correct. It is true for any function of map positions. More
generally, all macros depend on their arguments for their outputs.

> It isn't about (0,0) vs (-1, -1) but (-1, -1) vs (-10, -10).
> It is just luck that you get a real map position if you start with a
> non-real one.

This has nothing to do with "luck". You clearly still don't understand
the concepts if this is somehow magical to you.

If this is a standard map, then a square_iterate centered at (-10,-10)
will generate no real points until it has a radius >10, all unreal
points will be handled in an else clause. All real points will be
normalized on output.

But a square_iterate centered at (-10, 10) will happily generate the
correctly normalized real points corresponding to the wrapped position
as it was designed to do. It will also generate unreal points in the
else clause if the radius exceeds 10, since it will fall of the north
edge of the map in this case.

This is 100% reproducible and correct. This is the defined interface
on which the current code is based. Given an arbitrary point, iterators
iterate and produce an output list of real/normalized points in the
if-clause and a list of unreal points in the else clause.

>>>>>This is bad. 
>>>>This is religion. It has nothing to do with correctness or
>>>>robustness which is all that should be of concern here..
>>>Ok. I rephrase this to "square_iterate should be able to catch errors
>>>which are made by others parts of the code and not conceal the

There are no errors.

Let me rephrase this again for you ... there are no errors.

Even if there were, the purpose of square_iterate and the rest of the
map iterators should *not* be turned into nothing more than your personal
Inquisition tool for catching these boogeymen you are so afraid of.

These iterators serve a purpose with a well defined interface and this
should not be broken by people that don't fully understand it for
purposes that have nothing to do with their original purpose.

>>So again we are back to where we started...what about code that needs 
>>this functionality?

No code *needs* Raimar's functionality, never has, never will :-).

> It should make the normalization before. It the code wants to pass
> non-real map positions in it has to use another macro.


There is absolutely no technical rationale for this.

If you don't like the current map macros, make up your own for your own
code. Don't force others to rewrite the current macros for the base code.

But you would be better learn the real rules why rather than making up
simpleton phrases that have no technical rationale or utility and then
making like they are somehow a reason to upset the world order or even
your own little corner of it.

You have in fact chosen a route that makes FreeCIV highly non-robust
and subject to major problems from simple mistakes or random cases
where things fall outside an unnecessarily restrictive set of
conditions. You have also not yet understood what is really needed or
when the real rules should be applied. FreeCIV is suffering because
of this.

>       Raimar


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