Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] semi-static typing in server config (was: Re: Split patch
Home

[Freeciv-Dev] semi-static typing in server config (was: Re: Split patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] semi-static typing in server config (was: Re: Split patch (was Re: [RFC PATCH] init_techs))
From: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Date: Mon, 8 Oct 2001 11:19:08 -0400 (EDT)

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?

--Daniel Speyer
"May the /src be with you, always"





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