Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: request for discussion: hiding enums using typedef
Home

[Freeciv-Dev] Re: request for discussion: hiding enums using typedef

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: request for discussion: hiding enums using typedef
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Oct 2002 15:15:22 +0100

On Tue, Oct 15, 2002 at 09:58:19PM +0000, Per I. Mathisen wrote:
> This patch un-hides the enums that are hidden through typedef in
> improvement.h as part of the generalised improvements patches.
> 
> I think hiding enum types in this way is bad, since those reading this
> part of the code get less information about what it is. It makes
> understanding what goes on harder.

        Well, I'm not bothered either way, but obviously this change
will mean I'll have to make mega-changes in the impr-gen patches, so get
it right (well, in keeping with consensus opinion, anyway) first time,
please! ;)

        My suggestion is that you leave the enum definitions themselves
in common/improvement.h unchanged, and just remove the typedefs, i.e.
use "enum effect_range_id" everywhere instead of "Eff_Range_id". That
removes all that nasty uppercase that Mike's complaining about.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"640K ought to be enough for anybody."
        - Bill Gates, 1981


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