Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: (PR#13460) consistent names for index-to-pointer looku
Home

[Freeciv-Dev] Re: (PR#13460) consistent names for index-to-pointer looku

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#13460) consistent names for index-to-pointer lookups
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Jul 2005 13:13:08 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13460 >

Per I. Mathisen wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13460 >
> 
> On Tue, 12 Jul 2005, Jason Short wrote:
> 
>>Honestly I don't mind having get_XXX_by_index for some objects and
>>find_xxx_by_id for others; if nothing else this helps you remember which
>>can be stored by pointer and which must use the ID.
> 
> I do mind. I would very much prefer a uniform namespace, for future
> extensions to the delta code which may want to use these functions for
> automatic translations of pointers to index and back.

In that case I guess all pXXX->index should be renamed as pXXX->id and
all lookup functions should be get_XXX_by_id or XXX_get_by_id.

-jason





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