[Freeciv-Dev] Re: [CMA 2.3] A few comments
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
[Freeciv-Dev] Re: [CMA 2.3] A few comments, Tony Stuckey, 2001/10/09
[Freeciv-Dev] Re: [CMA 2.3] A few comments, Daniel L Speyer, 2001/10/09
[Freeciv-Dev] Re: [CMA 2.3] A few comments, Raimar Falke, 2001/10/10
[Freeciv-Dev] Re: [CMA 2.3] A few comments, Ross W. Wetmore, 2001/10/12
|
|