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: Reinier Post <rp@xxxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification)
From: Arien Malec <arien_malec@xxxxxxxxx>
Date: Mon, 1 Oct 2001 09:14:22 -0700 (PDT)

--- 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:

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]