Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#7075) break and continue in iterators
Home

[Freeciv-Dev] Re: (PR#7075) break and continue in iterators

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7075) break and continue in iterators
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 27 Jun 2004 02:43:03 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7075 >


If you have setup the base core_iterate with appropriate implementation of
the core_iterators on top of this as the example of how such things should
be done, then set the standard for all future iterators (new iterators must
follow this rule).

Convert or document all current iterators that fail this in a quick pass
now, and worry about any troublesome documented ones at leisure.

One solves the immediate problem, prevents any issues from getting worse and
lets programmers know and use both good programming practices while dealing
with any exceptions on an as needed vs resource basis.

But changing the macros is probably such a trivial operation to a limited
number of headers with advantages of improved robustness and efficiency, I
wouldn't think there would be too many spots one would want to panic about.

Cheers,
RossW
=====

Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7075 >
> 
> I think all of our iterator macros (those with "iterate" in them) should
> be able to respect break.  However aside from iterate_outward() I'm not
> sure which don't do so.  I also don't really want to start changing
> macros unless we have this rule officially in place (see PR#9117).
> 
> jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#7075) break and continue in iterators, rwetmore@xxxxxxxxxxxx <=