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]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13460) consistent names for index-to-pointer lookups
From: "Benoit Hudson" <benoit.hudson@xxxxxxxxx>
Date: Tue, 12 Jul 2005 11:21:35 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> Opinions?

get_player versus find_city_by_id is my pet peeve.  Whatever the
naming convention is, it should be consistant for all int -> something
mappings.  I think get_X_by_id or find_X_by_id makes me happiest. 
Especially when we're dealing with integer types where type-checking
is pretty weak, I like the idea of having the name of the function
tell me what type to put in.

I don't understand how get_unit_class fundamentally differs from the others.





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