Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [CMA 2.3] A few comments
Home

[Freeciv-Dev] Re: [CMA 2.3] A few comments

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [CMA 2.3] A few comments
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Sun, 14 Oct 2001 21:23:19 +0100

On Tue, 9 Oct 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
>> > MAX_CMAS is an internal constant. Code from outside has to use
>> > cmafc_predefined_num to get the number of predefined parameters.
>> >
>> 
>> Why not just import header files? Is this for other languages like
>> python etc?
> 
> Encapsulation. Data hiding.

Could you give us a real explanation, rather than just OO buzzwords?

As nearly as I can tell, MAX_CMAS is just a constant with a name.  A
define or an enum is the usual way to do this in C.  Using a function
instead is generally only useful if you wish to change the constant
while preserving binary compatibility; I don't think this is the case
here, so cmafc_predefined_num() is just bloat.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
..  here I am in 53 B.C. and all I want is a dill pickle!!


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