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: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [CMA 2.3] A few comments
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Oct 2001 22:48:06 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Oct 14, 2001 at 09:23:19PM +0100, Gaute B Strokkenes wrote:
> 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.

Currently it may be unnecessary. But what happens if the user can add
new predefined choices? This isn't this far in the future.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I do feel kind of sorry for Microsoft. Their attornies and marketing
  force must have tons of ulcers trying to figure out how to beat (not
  just co-exist with) a product that has no clearly defined (read
  suable) human owner, and that changes on an hourly basis like the
  sea changes the layout of the sand on a beach. Severely tough to
  fight something like that."
    -- David D.W. Downey at linux-kernel


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