[Freeciv-Dev] Re: semi-static typing in server config (was: Re: Split pa
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Oct 08, 2001 at 11:19:08AM -0400, Daniel L Speyer wrote:
> I've been vaguely working on a more complete parsing structure, and it
> seems to me that freeciv has some strange static typing needs. Some
> attributes are free-form, some are integer, some as
> readable-filename. Some could be weirder (a unit might be desired with
> movement=4/3, but 4/7 should give an error). Furthermore, there should be
> a capability to create new variables with stranger limits without
> rewriting tons of code (part of the point of the redesign is to be more
> extensible).
>
> It seems to me that there would be advantages in putting the limits on
> values in the configuration file, possibly with some sort of
> namespace.default which put type-checking on new objects (e.g. settype
> units.default.hitpoints 0<int<100). The question is, how should these
> limits be specified? For generality, I might propose that each variable
> has a python script to check its legitimacy (sort of like the foop
> functions is lisp), but this would make freeciv require python (especially
> a problem on windows systems).
>
> What ideas do other people have?
IMHO over-engineering. It would be helpful to have a list of all such
checks which are currently in the code.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
reality.sys corrupt. Reboot Universe? (y,n,q)
[Freeciv-Dev] Re: Split patch (was Re: [RFC PATCH] init_techs), Daniel L Speyer, 2001/10/05
|
|