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

[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]
To: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Cc: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: semi-static typing in server config (was: Re: Split patch (was Re: [RFC PATCH] init_techs))
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Oct 2001 17:49:11 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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)


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