Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset
Home

[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arien Malec <arien_malec@xxxxxxxxx>
Cc: Reinier Post <rp@xxxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification)
From: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Date: Mon, 1 Oct 2001 13:05:45 -0400 (EDT)

On Mon, 1 Oct 2001, Arien Malec wrote:

> 
> --- Reinier Post <rp@xxxxxxxxxx> wrote:
> > On Sat, Sep 29, 2001 at 02:55:03PM -0700, Arien Malec wrote:
> > > Better to issue a create first:
> > > 
> > > create tech.railroad
> > > set tech.railroad.name "Railroad"
> > 
> > I cannot see what 'tech.railroad' would mean in the first line.
> > In my proposal it is the tech whose .name field matches /^railroad/i,
> > but the name is only assigned in the second line.
> 
> I believe that there are advantages to make the token "railroad" in
> "tech.railroad" an identifier, and not a name:

I agree, and this becomes even more important when i18n is considered. 

Just as a convenience-note, how about making the name be automatically set
to the identifier capitalized with _s turned into ' 's?

> 
> 1) It parses easily, whereas names need to be tech."Atomic Theory", 
> identifiers
> can only be tech.atomic_theory
> 2) See the following set of commands:
> 
> ; in the ruleset:
> create unit.archers
> set unit.archers.name = "Archers"
> 
> ; on the command-line, my semantics
> set unit.archers.name = "Bowmen"
> set unit.archers.hitpoints = ...
> 
> ; on the command-line, your sematics
> set unit.archers.name = "Bowmen"
> set unit.bowmen.hitpoints = ....
> ; Does unit.archers still exist now?
> 
> 3) (minor point) It lines up with how the current rulesets work:
> 
> [advance_atomic_theory]
> name = _("Atomic Theory")
> req1 = ...
> req2 = ...
> flags = ...
> 
> becomes
> 
> create tech.atomic_theory
> set tech.atomic_theory.name = ...
> set tech.atomic_theory.req1 = ...
> 
> Or, in the multiple create/set syntax:
> 
> create tech.atomic_theory (
>   name = ...;
>   req1 = ...;
>   etc...
> )
> 
> Arien
> 
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
> 
> 



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