[Freeciv-Dev] Re: (PR#12927) RFC: rename pplayer->player_no
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12927 >
Benoit Hudson wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12927 >
>
> On Thu, Apr 28, 2005 at 01:21:15PM -0700, Jason Short wrote:
>
>>Aside from the insane hugeness such a patch might take, does anyone
>>object to this? One possible argument you could make is that they
>>should all be called "id".
>
> I vote for 'id' ; I don't care about player_no. I don't think it's
> really worth it but it's a very simple insane hugeness since presumably
> that's the only place where player_no is used.
Hmm. After looking at the places where this is used (in the patch) I
think (more strongly) that index and id are appropriate to name
separately. In many places the index value is used as a lookup into a
(global or local) array. There are lots of small arrays indexed by
player#, tile#, etc. This makes more sense using 'index' as the name
and the separation makes it clear you cannot do this with units and cities.
I still don't care that much. However if it's pplayer->id then all the
other index/id values (gov, impr, tile, unittype, tech) should be id as
well.
-jason
|
|